summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-07-03 15:53:17 +0200
committerSeth Mos <seth.mos@xs4all.nl>2009-07-03 15:53:17 +0200
commitc66f54e4c8290dde2534454a438ee04f980d9247 (patch)
treeadfce958861c7d8c1dcbcf87423c8b4148e2e2c3 /etc
parent0b5d5aa094ec83719dda942cf9b6a589de29f888 (diff)
downloadpfsense-c66f54e4c8290dde2534454a438ee04f980d9247.zip
pfsense-c66f54e4c8290dde2534454a438ee04f980d9247.tar.gz
Fix static route code so that upgrading from 1.2 works as intended.
We failed to clear a variable which meant we entered the wrong logic loop and with the default gateway IP at that.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 968747e..9217bd5 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -312,6 +312,8 @@ function system_routing_configure() {
}
foreach ($config['staticroutes']['route'] as $rtent) {
+ unset($gatewayip);
+ unset($interfacegw);
if(is_array($config['gateways']['gateway_item'])) {
foreach($config['gateways']['gateway_item'] as $gateway) {
if($rtent['gateway'] == $gateway['name']) {
@@ -324,7 +326,7 @@ function system_routing_configure() {
$gatewayip = $rtent['gateway'];
$interfacegw = $rtent['interface'];
}
- if(isset($rtent['interfacegateway'])) {
+ if((isset($rtent['interfacegateway'])) && (! is_ipaddr($gatewayip))){
mwexec("/sbin/route add " . escapeshellarg($rtent['network']) .
" -iface " . escapeshellarg(convert_friendly_interface_to_real_interface_name($interfacegw)));
} else {
@@ -1166,4 +1168,4 @@ function enable_watchdog() {
}
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud