summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-12-02 20:15:04 -0600
committerChris Buechler <cmb@pfsense.org>2014-12-02 20:15:04 -0600
commita0e9e17d2ddab7f07a20f09361f166a32dfda315 (patch)
tree79a9d00ace963ce084961724d6c306256932df57 /etc/inc/unbound.inc
parent0b0d83cbf0313c0e4bcbeac3cfab06820d540e4f (diff)
downloadpfsense-a0e9e17d2ddab7f07a20f09361f166a32dfda315.zip
pfsense-a0e9e17d2ddab7f07a20f09361f166a32dfda315.tar.gz
If get_interface_ip(v6) is passed an IP, return the IP.
Properly set up interface binding for v6 link local IPs. Ticket #4021 except had to comment out the fix for now because of #4062 to avoid config breakage.
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc17
1 files changed, 11 insertions, 6 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index 556e772..7f34df6 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -148,12 +148,17 @@ EOF;
$bindints .= "interface: ::0\n";
} else {
foreach($active_interfaces as $ubif) {
- $intip = get_interface_ip($ubif);
- if (is_ipaddrv4($intip))
- $bindints .= "interface: $intip\n";
- $intip = get_interface_ipv6($ubif);
- if (is_ipaddrv6($intip))
- $bindints .= "interface: $intip\n";
+ if (is_ipaddr($ubif)) {
+ //$bindints .= "interface: $ubif\n"; -- until redmine #4062 is fixed, then uncomment this.
+ } else {
+ $intip = get_interface_ip($ubif);
+ if (is_ipaddrv4($intip))
+ $bindints .= "interface: $intip\n";
+ $intip = get_interface_ipv6($ubif);
+ if (is_ipaddrv6($intip))
+ if (substr($intip, 0, 4) != "fe80") // skipping link local for the moment to not break people's configs: https://redmine.pfsense.org/issues/4062
+ $bindints .= "interface: $intip\n";
+ }
}
}
} else {
OpenPOWER on IntegriCloud