diff options
author | jim-p <jimp@pfsense.org> | 2013-02-05 13:46:02 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-02-05 13:47:00 -0500 |
commit | c65eef01a3421d94282ab7d193388d8a1ae4420f (patch) | |
tree | 10d351051084d837f50ceeb86d72c550f08945fb /etc/inc/gwlb.inc | |
parent | f73e35319a7f36c761cadac132c2f3484103b88f (diff) | |
download | pfsense-c65eef01a3421d94282ab7d193388d8a1ae4420f.zip pfsense-c65eef01a3421d94282ab7d193388d8a1ae4420f.tar.gz |
Only allow gateways of the appropriate type (ipv4 or ipv6) to affect whether a gateway is marked as default, otherwise you can end up with an ipv4 gateway marked as default for ipv6 and the gui just shows "default".
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 7439736..f8d96b8 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -460,13 +460,13 @@ function return_gateways_array($disabled = false, $localhost = false) { * the config. */ /* this is a fallback if all else fails and we want to get packets out @smos */ if (!isset($gateway['defaultgw'])) { - if (($gateway['friendlyiface'] == "wan") && ($found_defaultv4 == 0)) { + if (($gateway['friendlyiface'] == "wan") && ($found_defaultv4 == 0) && (!isset($gateway['ipprotocol']) || ($gateway['ipprotocol'] == "inet"))) { if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgw")) { $gateway['defaultgw'] = true; $found_defaultv4 = 1; } } - if (($gateway['friendlyiface'] == "wan") && ($found_defaultv6 == 0)) { + if (($gateway['friendlyiface'] == "wan") && ($found_defaultv6 == 0) && ($gateway['ipprotocol'] == "inet6")) { if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgwv6")) { $gateway['defaultgw'] = true; $found_defaultv6 = 1; |