mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
fixed bug where IPv6 was always being set on the tunnel interface
This commit is contained in:
parent
061fac44d2
commit
3eb959c8fe
14
src/tun.c
14
src/tun.c
|
@ -650,18 +650,20 @@ tun_setip(const char *ip, const char *other_ip, int netbits, int forward_v6)
|
||||||
# else
|
# else
|
||||||
display_ip = ip;
|
display_ip = ip;
|
||||||
# endif
|
# endif
|
||||||
fprintf(stderr, "Setting IPv6 of %s to ::%s\n", if_name, ip);
|
if (forward_v6) {
|
||||||
|
fprintf(stderr, "Setting IPv6 of %s to ::%s\n", if_name, ip);
|
||||||
|
|
||||||
snprintf(v6_cmdline, sizeof(cmdline),
|
snprintf(v6_cmdline, sizeof(cmdline),
|
||||||
IFCONFIGPATH "ifconfig %s inet6 add ::%s/64",
|
IFCONFIGPATH "ifconfig %s inet6 add ::%s/64",
|
||||||
if_name,
|
if_name,
|
||||||
display_ip);
|
display_ip);
|
||||||
|
|
||||||
v6_r = system(v6_cmdline);
|
v6_r = system(v6_cmdline);
|
||||||
|
|
||||||
if (v6_r != 0) {
|
if (v6_r != 0) {
|
||||||
return v6_r;
|
return v6_r;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
snprintf(cmdline, sizeof(cmdline),
|
snprintf(cmdline, sizeof(cmdline),
|
||||||
IFCONFIGPATH "ifconfig %s %s %s netmask %s",
|
IFCONFIGPATH "ifconfig %s %s %s netmask %s",
|
||||||
if_name,
|
if_name,
|
||||||
|
|
Loading…
Reference in New Issue