summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-02-05 13:46:02 -0500
committerjim-p <jimp@pfsense.org>2013-02-05 13:47:00 -0500
commitc65eef01a3421d94282ab7d193388d8a1ae4420f (patch)
tree10d351051084d837f50ceeb86d72c550f08945fb /etc
parentf73e35319a7f36c761cadac132c2f3484103b88f (diff)
downloadpfsense-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')
-rw-r--r--etc/inc/gwlb.inc4
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;
OpenPOWER on IntegriCloud