summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-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 012a9b1..7b979c4 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3769,4 +3769,19 @@ function pfsense_default_state_size() {
return $max_states;
}
+function lookup_gateway_ip_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($gatewayip);
+ }
+ }
+ } else {
+ return(false);
+ }
+}
+
?>
OpenPOWER on IntegriCloud