summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2011-08-26 09:37:47 +0200
committerSeth Mos <seth.mos@dds.nl>2011-08-26 09:37:47 +0200
commit7671c94009e66222ff13628e70d427366bb66283 (patch)
tree95bcf3bd8a5d108e17f134b901ba946a30855ad3 /etc/inc/gwlb.inc
parent2661e5d33f758d1860d3b1f0131b2b8da0fca2f0 (diff)
downloadpfsense-7671c94009e66222ff13628e70d427366bb66283.zip
pfsense-7671c94009e66222ff13628e70d427366bb66283.tar.gz
Add the IP protocol to the configured gateway list to prevent duplicate entries on dynamic interfaces
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index f2a68a2..8ed9529 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -288,10 +288,15 @@ function return_gateways_array($disabled = false) {
if(empty($gateway['gateway']) || $gateway['gateway'] == "dynamic") {
$gateway['gateway'] = get_interface_gateway($gateway['interface']);
/* no IP address found, set to dynamic */
- if(! is_ipaddr($gateway['gateway']))
+ if(! is_ipaddr($gateway['gateway'])) {
$gateway['gateway'] = "dynamic";
+ }
$gateway['dynamic'] = true;
}
+ if(is_ipaddrv4($gateway['gateway']))
+ $gateway['ipprotocol'] = "inet";
+ if(is_ipaddrv6($gateway['gateway']))
+ $gateway['ipprotocol'] = "inet6";
if (isset($gateway['monitor_disable']))
$gateway['monitor_disable'] = true;
else if (empty($gateway['monitor']))
OpenPOWER on IntegriCloud