diff options
author | lukehamburg <luke.hamburg@gmail.com> | 2017-03-09 19:54:28 -0500 |
---|---|---|
committer | lukehamburg <luke.hamburg@gmail.com> | 2017-03-09 19:54:28 -0500 |
commit | cd1ae3289b369bd7e85bf631aa1ae81f3281258a (patch) | |
tree | d36cc53904c06c4d693e7ae8cedb71332f0a028a /src/etc | |
parent | 2b359eda6d4d6712888a59cb5b01aeee245e34be (diff) | |
download | pfsense-cd1ae3289b369bd7e85bf631aa1ae81f3281258a.zip pfsense-cd1ae3289b369bd7e85bf631aa1ae81f3281258a.tar.gz |
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
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/system.inc | 16 |
1 files changed, 9 insertions, 7 deletions
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; |