fixed bug where IPv6 was always being set on the tunnel interface

This commit is contained in:
Chris Hellberg 2021-12-31 04:37:56 +00:00
parent 061fac44d2
commit 3eb959c8fe

View File

@ -650,6 +650,7 @@ tun_setip(const char *ip, const char *other_ip, int netbits, int forward_v6)
# else
display_ip = ip;
# endif
if (forward_v6) {
fprintf(stderr, "Setting IPv6 of %s to ::%s\n", if_name, ip);
snprintf(v6_cmdline, sizeof(cmdline),
@ -662,6 +663,7 @@ tun_setip(const char *ip, const char *other_ip, int netbits, int forward_v6)
if (v6_r != 0) {
return v6_r;
}
}
snprintf(cmdline, sizeof(cmdline),
IFCONFIGPATH "ifconfig %s %s %s netmask %s",
if_name,