t_net.sh: delete dummy iface using iproute command
PATCH 1/1 t_net.sh: delete dummy iface using iproute command
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 <[email protected]...>
--- tests/t_net.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/t_net.sh +1 -1
@@ -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
Signature · 1 line
2.35.1
Acked-by Gert Doering <[email protected]...>
Indeed, now t_net.sh properly cleans up behind itself :-) - thanks.
Your patch has been applied to the master and release/2.5 branch.
commit 976e6caf0e161d3c787e1378cec44608c17b292a (master) commit c3f4419cd37faaf4f2960d911a1008a161b82561 (release/2.5)
Author: Antonio Quartulli Date: Thu Apr 7 10:15:55 2022 +0200
t_net.sh: delete dummy iface using iproute command
Signed-off-by: Antonio Quartulli <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg24086.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering