diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-11-13 08:04:03 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-11-13 08:04:03 +0000 |
commit | 54d5e16f09a753d8f0c1c5fde4ab780b9f1aa9b4 (patch) | |
tree | e7af1218379719645a677021602b44f8ec5aa9c7 /etc/inc/gwlb.inc | |
parent | f01961a902a7257c9c758ccd2b9fd40adbb717e9 (diff) | |
download | pfsense-54d5e16f09a753d8f0c1c5fde4ab780b9f1aa9b4.zip pfsense-54d5e16f09a753d8f0c1c5fde4ab780b9f1aa9b4.tar.gz |
Correct typo to prevent gateways showing up twice.
Fetch monitor IP for automatic gateways from the interface config section
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 68de4e9..2185307 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -225,7 +225,7 @@ function return_gateways_array() { foreach($iflist as $ifname => $if ) { if(interface_has_gateway($ifname)) { $gateway = array(); - $friendly = convert_real_interface_to_friendly_interface_name($ifname); + $friendly = convert_real_interface_to_friendly_interface_name($friendly); $gateway['gateway'] = get_interface_gateway($ifname); /* Loopback for dynamic interfaces without a IP */ if(!is_ipaddr($gateway['gateway'])) { @@ -241,8 +241,12 @@ function return_gateways_array() { $gateway['interface'] = $ifname; $descr = convert_friendly_interface_to_friendly_descr($friendly); - /* FIXME: somehow retrieve a proper monitor IP? */ - $gateway['monitor'] = $gateway['gateway']; + /* dynamic interfaces fetch the monitor IP from the Interface config section */ + if(is_ipaddr($config['interfaces'][$friendly]['monitorip'])) { + $gateway['monitor'] = $config['interfaces'][$friendly]['monitorip']; + } else { + $gateway['monitor'] = $gateway['gateway']; + } $gateway['name'] = "{$friendly}"; $gateway['descr'] = "Interface {$descr} Gateway"; $gateway['modifier'] = "readonly"; |