Hi, On Fri, Aug 19, 2022 at 07:04:52PM +0200, Gert Doering wrote: > The change is as we have discussed, and I still think it's a good and > clean way forward. The "undo_ifconfig_ipv4() / _ipv6()" functions > are as they have been before (except that they now get compiled for > all platforms except WIN32 - the "linux only" part was a 2.5.0 oversight), > and the calls moved 1:1 from (TARGET_LINUX) close_tun() to a new > undo_ifconfig() function. tun.c is still a mess, but this helps a bit.
I did lots of testing on FreeBSD today, and it turns out that the generic "undo" code is just a mess and clutters the log with garbage... 2022-08-20 22:58:02 /sbin/ifconfig tun4 0.0.0.0 ifconfig: ioctl (SIOCAIFADDR): Destination address required 2022-08-20 22:58:02 Generic ip addr del failed: external program exited with error status: 1 2022-08-20 22:58:02 /sbin/ifconfig tun4 del fd00:abcd:194:2::103d/64 ifconfig: del: bad value 2022-08-20 22:58:02 Generic ip -6 addr del failed: external program exited with error status: 1 ... not Max' fault, but I wonder if this ever did something useful... (I'm fairly sure "set ipv4 address to 0.0.0.0" was a valid way to undo IPv4 ifconfig, but I do not think "del" was ever a valid ifconfig IPv6 syntax on *BSD) So - this needs fixing, and platform-by-platform testing... Technically, for most cases this won't be actually needed - if the tun/tap interface is destroyed at program end ("ifconfig tun4 destroy"), the IPv4/IPv6 config is gone anyway. Only for persistant interfaces it makes a difference. gert -- "If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress Gert Doering - Munich, Germany g...@greenie.muc.de
signature.asc
Description: PGP signature
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel