summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorlukehamburg <luke.hamburg@gmail.com>2017-03-09 19:54:28 -0500
committerlukehamburg <luke.hamburg@gmail.com>2017-03-09 19:54:28 -0500
commitcd1ae3289b369bd7e85bf631aa1ae81f3281258a (patch)
treed36cc53904c06c4d693e7ae8cedb71332f0a028a /src/etc
parent2b359eda6d4d6712888a59cb5b01aeee245e34be (diff)
downloadpfsense-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.inc16
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;
OpenPOWER on IntegriCloud