Disable IPv6 inside 4in6 and 4in4 gif tunnels

When setting up an IPv4-over-IPv6 or IPv4-over-IPv4 gif tunnel, IPv6 should be disabled inside the tunnel to prevent the automatic configuration of an IPv6 link-local address.
This commit is contained in:
Maurice Walker 2022-07-15 17:33:48 +02:00 committed by Franco Fichtner
parent e3051bd60b
commit 9c55f1ccac

View File

@ -657,6 +657,7 @@ function _interfaces_gif_configure($gif)
if ((is_ipaddrv6($gif['tunnel-local-addr'])) || (is_ipaddrv6($gif['tunnel-remote-addr']))) {
mwexec("/sbin/ifconfig {$gif['gifif']} inet6 " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " prefixlen 128");
} else {
mwexec("/sbin/ifconfig {$gif['gifif']} inet6 ifdisabled");
mwexec("/sbin/ifconfig {$gif['gifif']} " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " netmask " . gen_subnet_mask($gif['tunnel-remote-net']));
}