From cd1ae3289b369bd7e85bf631aa1ae81f3281258a Mon Sep 17 00:00:00 2001 From: lukehamburg Date: Thu, 9 Mar 2017 19:54:28 -0500 Subject: Adds option to skip adding IPv6 entries in /etc/hosts for LANs If a LAN interface's IPv6 configuration is set to Track, and the tracked interface loses connectivity, it can cause connections to the firewall that were established via IPv6 hostname to fail. This can happen unintentionally when accessing the system by hostname, since by default both IPv4 and IPv6 entries are added to /etc/hosts. This patch + enabling this option prevents those IPv6 records from being created and prevents this from occurring. Set the option in System > Advanced > Networking FILES CHANGED - /etc/inc/system.inc - /usr/local/www/system_advanced_network.php --- src/etc/inc/system.inc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/etc') diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 61b6a77..6a1f529 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -327,13 +327,15 @@ function system_hosts_local_entries() { ); $hosts_if_found = true; } - $cfgipv6 = get_interface_ipv6($sysif); - if (is_ipaddrv6($cfgipv6)) { - $hosts[] = array( - 'ipaddr' => $cfgipv6, - 'fqdn' => $local_fqdn - ); - $hosts_if_found = true; + if (!isset($syscfg['ipv6dontcreatelocaldns'])) { + $cfgipv6 = get_interface_ipv6($sysif); + if (is_ipaddrv6($cfgipv6)) { + $hosts[] = array( + 'ipaddr' => $cfgipv6, + 'fqdn' => $local_fqdn + ); + $hosts_if_found = true; + } } if ($hosts_if_found == true) { break; -- cgit v1.1