]> git.ipfire.org Git - thirdparty/openvpn.git/commit
tun: ensure interface can be configured with IPv6 only
authorAntonio Quartulli <antonio@openvpn.net>
Mon, 18 Jun 2018 07:47:33 +0000 (15:47 +0800)
committerGert Doering <gert@greenie.muc.de>
Mon, 18 Jun 2018 17:35:50 +0000 (19:35 +0200)
commit611fcbc487292054306767a76e727aea4e593725
treef27f408611ae6a44b92b90501caa22b8f73e4e4d
parent78c58cfb02c5ca543cc7e0962337003601483e39
tun: ensure interface can be configured with IPv6 only

This change ensures that an interface is properly brought
up and down even when only IPv6 settings are configured/pushed.

At the same time, some code restyling took place to ensure the new
generic logic is easier to read. Both do_ifconfig() and close_tun()
(Linux only) functions have been rearranged by splitting the logic
into a v4 and a v6 specific part. Each part has then been moved
into an idependent helper that can be invoked as
needed.

This makes the code easier to read and more "symmetric" with
respect to the two address families.

Trac: #208
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20180618074733.19773-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17064.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c
src/openvpn/tun.h