diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2015-08-10 16:45:51 +0200 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2015-08-10 16:45:51 +0200 |
commit | fd15a53c49ca01530665639f3711604c436601ee (patch) | |
tree | 452c73475f617631e23f13c4d176336939521ad7 /src/openvpn/tun.c | |
parent | d42fbdd9d8dc05868a9ce749fb43a37e6b75b143 (diff) | |
parent | 41ffafc126abd9af67061f4931b7614f3cb898b0 (diff) |
Merge tag 'upstream/2.3.8'
Upstream version 2.3.8
Diffstat (limited to 'src/openvpn/tun.c')
-rw-r--r-- | src/openvpn/tun.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 285e774..3e20215 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1714,6 +1714,32 @@ close_tun (struct tuntap *tt) argv_msg (M_INFO, &argv); openvpn_execve_check (&argv, NULL, 0, "Linux ip addr del failed"); + if (tt->ipv6 && tt->did_ifconfig_ipv6_setup) + { + const char * ifconfig_ipv6_local = print_in6_addr (tt->local_ipv6, 0, &gc); + +#ifdef ENABLE_IPROUTE + argv_printf (&argv, "%s -6 addr del %s/%d dev %s", + iproute_path, + ifconfig_ipv6_local, + tt->netbits_ipv6, + tt->actual_name + ); + argv_msg (M_INFO, &argv); + openvpn_execve_check (&argv, NULL, 0, "Linux ip -6 addr del failed"); +#else + argv_printf (&argv, + "%s %s del %s/%d", + IFCONFIG_PATH, + tt->actual_name, + ifconfig_ipv6_local, + tt->netbits_ipv6 + ); + argv_msg (M_INFO, &argv); + openvpn_execve_check (&argv, NULL, 0, "Linux ifconfig inet6 del failed"); +#endif + } + argv_reset (&argv); gc_free (&gc); } |