summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-03-03 13:30:57 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-03-03 13:31:32 -0300
commit2ccaa575593b79d43680214cd57307b9c7f65936 (patch)
treef2ae2ab94b983682083fdb3681e74e5f5a8af1c9 /etc
parent246950c38fc3faaeb68c4740d0b7c761f2fc1f8d (diff)
downloadpfsense-2ccaa575593b79d43680214cd57307b9c7f65936.zip
pfsense-2ccaa575593b79d43680214cd57307b9c7f65936.tar.gz
Remove broken 'dynamic6' gateway, we already have ipprotocol to tell us the IP version, leave it more simple using only 'dynamic'. It helps #3484
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/gwlb.inc12
-rw-r--r--etc/inc/system.inc4
2 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index e924a31..a436439 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -388,7 +388,7 @@ function return_gateways_array($disabled = false, $localhost = false) {
continue;
/* if the gateway is dynamic and we can find the IPv4, Great! */
- if (empty($gateway['gateway']) || $gateway['gateway'] == "dynamic" || $gateway['gateway'] == "dynamic6") {
+ if (empty($gateway['gateway']) || $gateway['gateway'] == "dynamic") {
if ($gateway['ipprotocol'] == "inet") {
/* we know which interfaces is dynamic, this should be made a function */
$gateway['gateway'] = get_interface_gateway($gateway['interface']);
@@ -398,13 +398,13 @@ function return_gateways_array($disabled = false, $localhost = false) {
$gateway['dynamic'] = true;
}
- /* if the gateway is dynamic6 and we can find the IPv6, Great! */
+ /* if the gateway is dynamic and we can find the IPv6, Great! */
else if ($gateway['ipprotocol'] == "inet6") {
/* we know which interfaces is dynamic, this should be made a function, and for v6 too */
$gateway['gateway'] = get_interface_gateway_v6($gateway['interface']);
- /* no IPv6 address found, set to dynamic6 */
+ /* no IPv6 address found, set to dynamic */
if (!is_ipaddrv6($gateway['gateway']))
- $gateway['gateway'] = "dynamic6";
+ $gateway['gateway'] = "dynamic";
$gateway['dynamic'] = true;
}
} else {
@@ -585,7 +585,7 @@ function return_gateways_array($disabled = false, $localhost = false) {
/* Loopback dummy for dynamic interfaces without a IP */
if (!is_ipaddrv6($gateway['gateway']) && $gateway['dynamic'] == true)
- $gateway['gateway'] = "dynamic6";
+ $gateway['gateway'] = "dynamic";
/* automatically skip known static and dynamic gateways we have a array entry for */
foreach($gateways_arr as $gateway_item) {
@@ -670,7 +670,7 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
$dfltgwdown = true;
}
if ($dfltgwdown == true && !empty($upgw)) {
- if (preg_match("/dynamic/i", $gateways_arr[$upgw]['gateway']))
+ if ($gateways_arr[$upgw]['gateway'] == "dynamic")
$gateways_arr[$upgw]['gateway'] = get_interface_gateway($gateways_arr[$upgw]['friendlyiface']);
if (is_ipaddr($gateways_arr[$upgw]['gateway'])) {
log_error("Default gateway down setting {$upgw} as default!");
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 30c2a97..da6e25d 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -395,8 +395,8 @@ function system_routing_configure($interface = "") {
@file_put_contents("{$g['tmp_path']}/{$defaultif}_defaultgw", $gateway['gateway']);
}
$foundgw = true;
- } else if ($gateway['ipprotocol'] == "inet6" && (is_ipaddrv6($gateway['gateway']) || $gateway['gateway'] == "dynamic6")) {
- if ($gateway['gateway'] == "dynamic6")
+ } else if ($gateway['ipprotocol'] == "inet6" && (is_ipaddrv6($gateway['gateway']) || $gateway['gateway'] == "dynamic")) {
+ if ($gateway['gateway'] == "dynamic")
$gateway['gateway'] = get_interface_gateway_v6($gateway['interface']);
$gatewayipv6 = $gateway['gateway'];
$interfacegwv6 = $gateway['interface'];
OpenPOWER on IntegriCloud