summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-11-17 12:59:58 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-11-17 12:59:58 +0000
commitca96864b4183f6d9f9455c28353f4a66f7400136 (patch)
tree17878a5afd119086d100eea7c2c2104bf7b6d9af /etc/inc/gwlb.inc
parent5330430193ed223700547ed8831046fa951a8575 (diff)
downloadpfsense-ca96864b4183f6d9f9455c28353f4a66f7400136.zip
pfsense-ca96864b4183f6d9f9455c28353f4a66f7400136.tar.gz
Correctly process static gateway entries which have a label and not a IP.
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 130d09a..5172480 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -226,7 +226,11 @@ function return_gateways_array() {
if(interface_has_gateway($ifname)) {
$gateway = array();
$friendly = convert_real_interface_to_friendly_interface_name($ifname);
- $gateway['gateway'] = get_interface_gateway($ifname);
+ if(isset($config['interfaces'][$friendly]['gateway'])) {
+ $gateway['gateway'] = lookup_gateway_ip_by_name($config['interfaces'][$friendly]['gateway']);
+ } else {
+ $gateway['gateway'] = get_interface_gateway($ifname);
+ }
/* Loopback for dynamic interfaces without a IP */
if(!is_ipaddr($gateway['gateway'])) {
$gateway['gateway'] = "127.0.0.2";
OpenPOWER on IntegriCloud