summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/pfsense-utils.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 7b979c4..31d9cd1 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3784,4 +3784,19 @@ function lookup_gateway_ip_by_name($name) {
}
}
+function lookup_gateway_interface_by_name($name) {
+ global $config;
+ if(is_array($config['gateways'])) {
+ foreach($config['gateways']['gateway_item'] as $gateway) {
+ if($gateway['name'] == "$name") {
+ $gatewayip = $gateway['gateway'];
+ $interfacegw = $gateway['interface'];
+ return($interfacegw);
+ }
+ }
+ } else {
+ return(false);
+ }
+}
+
?>
OpenPOWER on IntegriCloud