diff options
author | Chris Buechler <cmb@pfsense.org> | 2014-12-02 20:15:04 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2014-12-02 20:15:04 -0600 |
commit | a0e9e17d2ddab7f07a20f09361f166a32dfda315 (patch) | |
tree | 79a9d00ace963ce084961724d6c306256932df57 /etc/inc/interfaces.inc | |
parent | 0b0d83cbf0313c0e4bcbeac3cfab06820d540e4f (diff) | |
download | pfsense-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/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index b2912b7..e479c22 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -4795,6 +4795,10 @@ function ip_in_interface_alias_subnet($interface, $ipalias) { } function get_interface_ip($interface = "wan") { + // if we get passed an IP for some reason, return the IP. + if (is_ipaddr($interface)) + return $interface; + $realif = get_failover_interface($interface); if (!$realif) { if (strstr($interface, "_vip")) @@ -4813,6 +4817,10 @@ function get_interface_ip($interface = "wan") { function get_interface_ipv6($interface = "wan", $flush = false) { global $config; + // if we get passed an IP for some reason, return the IP. + if (is_ipaddr($interface)) + return $interface; + $realif = get_failover_interface($interface, "inet6"); if (!$realif) { if (strstr($interface, "_vip")) |