summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-07-21 20:24:13 +0000
committerErmal <eri@pfsense.org>2010-07-21 20:24:24 +0000
commit3cc0728228d1062903d73ffa899eb004f2f670d6 (patch)
treee56999cc6de25dc772b0e2f092fb1a2cdcbb3ff2 /etc
parent280b75d9b8d6a37485be17a799c001c425d11e6c (diff)
downloadpfsense-3cc0728228d1062903d73ffa899eb004f2f670d6.zip
pfsense-3cc0728228d1062903d73ffa899eb004f2f670d6.tar.gz
Fixes #717. Actually if no default gateway is found assume wan is the one.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 3166cd0..e7fc684 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -276,10 +276,10 @@ function system_routing_configure($interface = "") {
$gatewayip = "";
$interfacegw = "";
+ $foundgw = false;
/* tack on all the hard defined gateways as well */
if (is_array($config['gateways']['gateway_item'])) {
mwexec("/bin/rm {$g['tmp_path']}/*_defaultgw", true);
- $foundgw = false;
foreach ($config['gateways']['gateway_item'] as $gateway) {
if (isset($gateway['defaultgw'])) {
if ($gateway['gateway'] == "dynamic")
@@ -295,13 +295,13 @@ function system_routing_configure($interface = "") {
break;
}
}
- if ($foundgw == false) {
- $defaultif = get_real_interface("wan");
- $interfacegw = "wan";
- $gatewayip = get_interface_gateway("wan");
- @touch("{$g['tmp_path']}/{$defaultif}_defaultgw");
- }
}
+ if ($foundgw == false) {
+ $defaultif = get_real_interface("wan");
+ $interfacegw = "wan";
+ $gatewayip = get_interface_gateway("wan");
+ @touch("{$g['tmp_path']}/{$defaultif}_defaultgw");
+ }
$dont_add_route = false;
/* if OLSRD is enabled, allow WAN to house DHCP. */
if($config['installedpackages']['olsrd']) {
@@ -1451,4 +1451,4 @@ function system_get_dmesg_boot() {
return file_get_contents("{$g['varlog_path']}/dmesg.boot");
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud