summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 51e3489..a6a3d1f 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3380,7 +3380,13 @@ function get_interface_gateway($interface) {
$gw = file_get_contents("{$g['tmp_path']}/{$realif}_router");
$gw = rtrim($gw);
} else {
- $gw = $config['interfaces'][$interface]['gateway'];
+ foreach($config['gateways']['gateway_item'] as $gateway) {
+ if($gateway['name'] == $gateway['name']) {
+ $gatewayip = $gateway['gateway'];
+ $interfacegw = $gateway['interface'];
+ }
+ }
+ $gw = $gatewayip;
}
/* if wan is requested, return it */
if($interface == "wan")
OpenPOWER on IntegriCloud