From: Antonio Quartulli Date: Thu, 7 Apr 2022 10:15:55 +0200 Message-Id: <20220407081555.25228-1-a@...2181...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH] t_net.sh: delete dummy iface using iproute command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Antonio Quartulli A dummy interface cannot be deleted using --rmtun because openvpn tries to send some ioctl (i.e. TUNSETPERSIST) which is not supported by this device type. This results in the following error: 2022-04-07 09:59:29 Cannot ioctl TUNSETPERSIST(0) ovpn-dummy0: Bad file descriptor (errno=9) 2022-04-07 09:59:29 Exiting due to fatal error and the interface is not deleted. Use iproute to generically delete an interface. Signed-off-by: Antonio Quartulli --- tests/t_net.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/t_net.sh b/tests/t_net.sh index f9dba404..af78152c 100755 --- a/tests/t_net.sh +++ b/tests/t_net.sh @@ -166,6 +166,6 @@ for i in $(seq 0 $MAX_TEST); do done # remove interface for good -$RUN_SUDO $openvpn --dev $IFACE --dev-type tun --rmtun >/dev/null +$RUN_SUDO ip link del $IFACE exit 0 -- 2.35.1