diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/system.inc | 6 |
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 +?> |