summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-11-13 18:27:10 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-11-13 18:27:10 +0000
commit69d52504d334ed303d50a794867ac12577b43940 (patch)
tree1d55ec52b52714e4ae09d9bebfcbd6cb8f0bc656 /etc/inc/gwlb.inc
parentd7dfd5f8f47fe50451a07618ba58e5c2f4e93722 (diff)
downloadpfsense-69d52504d334ed303d50a794867ac12577b43940.zip
pfsense-69d52504d334ed303d50a794867ac12577b43940.tar.gz
Pick monitor IP from the interface config section
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index ab27d8b..130d09a 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -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'];
+ /* retrieve a proper monitor IP? */
+ 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['attribute'] = "system";
OpenPOWER on IntegriCloud