Commit 75d7ff54 authored by Franco Fichtner's avatar Franco Fichtner

system: fix typo in default far gw default setup

Kindly pointed out by a generous tester.  Thank you.

(cherry picked from commit 0ce997d0)
(cherry picked from commit 29153230)
parent 956aaa3f
...@@ -590,8 +590,8 @@ function system_routing_configure($interface = '') ...@@ -590,8 +590,8 @@ function system_routing_configure($interface = '')
log_error("ROUTING: setting IPv4 default route to {$gatewayip}"); log_error("ROUTING: setting IPv4 default route to {$gatewayip}");
mwexecf('/sbin/route delete -inet %s', 'default'); mwexecf('/sbin/route delete -inet %s', 'default');
if ($fargw) { if ($fargw) {
mwexecf('/sbin/route delete -inet %s -interface %s', array($gatewayip, $interfacegw)); mwexecf('/sbin/route delete -inet %s -interface %s', array($gatewayip, $defaultif));
mwexecf('/sbin/route add -inet %s -interface %s', array($gatewayip, $interfacegw)); mwexecf('/sbin/route add -inet %s -interface %s', array($gatewayip, $defaultif));
} }
mwexecf('/sbin/route add -inet %s %s', array('default', $gatewayip)); mwexecf('/sbin/route add -inet %s %s', array('default', $gatewayip));
} }
...@@ -605,8 +605,8 @@ function system_routing_configure($interface = '') ...@@ -605,8 +605,8 @@ function system_routing_configure($interface = '')
log_error("ROUTING: setting IPv6 default route to {$gatewayipv6}"); log_error("ROUTING: setting IPv6 default route to {$gatewayipv6}");
mwexecf('/sbin/route delete -inet6 %s %s', array('default', $gatewayipv6)); mwexecf('/sbin/route delete -inet6 %s %s', array('default', $gatewayipv6));
if ($fargw) { if ($fargw) {
mwexecf('/sbin/route delete -inet6 %s -interface %s', array($gatewayipv6, $interfacegwv6)); mwexecf('/sbin/route delete -inet6 %s -interface %s', array($gatewayipv6, $defaultifv6));
mwexecf('/sbin/route add -inet6 %s -interface %s', array($gatewayipv6, $interfacegwv6)); mwexecf('/sbin/route add -inet6 %s -interface %s', array($gatewayipv6, $defaultifv6));
} }
mwexecf('/sbin/route add -inet6 %s %s', array('default', $gatewayipv6)); mwexecf('/sbin/route add -inet6 %s %s', array('default', $gatewayipv6));
} }
...@@ -764,8 +764,8 @@ function system_staticroutes_configure($interface = '', $update_dns = false) ...@@ -764,8 +764,8 @@ function system_staticroutes_configure($interface = '', $update_dns = false)
if (is_ipaddr($gatewayip)) { if (is_ipaddr($gatewayip)) {
mwexec("/sbin/route delete".$cmd . escapeshellarg($gatewayip)); mwexec("/sbin/route delete".$cmd . escapeshellarg($gatewayip));
if ($fargw) { if ($fargw) {
mwexecf('/sbin/route delete %s %s -interface %s', array($inet, $ip, $interfacegw)); mwexecf('/sbin/route delete %s %s -interface %s', array($inet, $gatewayip, $interfacegw));
mwexecf('/sbin/route add %s %s -interface %s', array($inet, $ip, $interfacegw)); mwexecf('/sbin/route add %s %s -interface %s', array($inet, $gatewayip, $interfacegw));
} }
mwexec("/sbin/route add".$cmd . escapeshellarg($gatewayip)); mwexec("/sbin/route add".$cmd . escapeshellarg($gatewayip));
} elseif (!empty($interfacegw)) { } elseif (!empty($interfacegw)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment