diff options
author | Ermal <eri@pfsense.org> | 2013-02-13 22:40:22 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-13 22:40:22 +0000 |
commit | a1e4e2a79fce4c734cf3d8e485531f60da5763e8 (patch) | |
tree | 4726208cfc520ee50772f7d8d593c482bb0e865b /etc/inc/util.inc | |
parent | 72f25519a9ee36cd9c0ba33a3b8736ef0fb7ae26 (diff) | |
download | pfsense-a1e4e2a79fce4c734cf3d8e485531f60da5763e8.zip pfsense-a1e4e2a79fce4c734cf3d8e485531f60da5763e8.tar.gz |
Two interfaces, carp, ip aliases might be on the same subnet as their parent. What needs to be checked is the ip itself
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index fb495f4..3c78f95 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -836,22 +836,24 @@ function get_configured_interface_with_descr($only_opt = false, $withdisabled = */ function get_configured_ip_addresses() { global $config; - require_once("interfaces.inc"); + + if (!function_exists('get_configured_interface_list')) + require_once("interfaces.inc"); $ip_array = array(); $interfaces = get_configured_interface_list(); - if(is_array($interfaces)) { + if (is_array($interfaces)) { foreach($interfaces as $int) { $ipaddr = get_interface_ip($int); $ip_array[$int] = $ipaddr; } } $interfaces = get_configured_carp_interface_list(); - if(is_array($interfaces)) + if (is_array($interfaces)) foreach($interfaces as $int => $ipaddr) $ip_array[$int] = $ipaddr; /* pppoe server */ - if (is_array($config['pppoes']['pppoe'])) { + if (is_array($config['pppoes']) && is_array($config['pppoes']['pppoe'])) { foreach($config['pppoes']['pppoe'] as $pppoe) { if ($pppoe['mode'] == "server") { if(is_ipaddr($pppoe['localip'])) { @@ -861,6 +863,7 @@ function get_configured_ip_addresses() { } } } + return $ip_array; } |