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
12
src/tun.c
12
src/tun.c
|
@ -650,17 +650,19 @@ tun_setip(const char *ip, const char *other_ip, int netbits, int forward_v6)
|
|||
# else
|
||||
display_ip = ip;
|
||||
# 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",
|
||||
if_name,
|
||||
display_ip);
|
||||
|
||||
v6_r = system(v6_cmdline);
|
||||
v6_r = system(v6_cmdline);
|
||||
|
||||
if (v6_r != 0) {
|
||||
return v6_r;
|
||||
if (v6_r != 0) {
|
||||
return v6_r;
|
||||
}
|
||||
}
|
||||
snprintf(cmdline, sizeof(cmdline),
|
||||
IFCONFIGPATH "ifconfig %s %s %s netmask %s",
|
||||
|
|
Loading…
Reference in New Issue