Fixed some typos introduced in ab1cade

This commit is contained in:
Jos Schellevis 2015-01-09 14:13:55 +00:00
parent ab1cadea90
commit fefd9baffe
3 changed files with 11 additions and 7 deletions

View File

@ -778,9 +778,10 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
} else {
$inetfamily = "-inet";
}
if ($defaultgw != $gateways_arr[$dfltgwname]['gateway'])
if ($defaultgw != $gateways_arr[$dfltgwname]['gateway']) {
mwexec("/sbin/route delete {$inetfamily} default {$gateways_arr[$dfltgwname]['gateway']}");
mwexec("/sbin/route add {$inetfamily} default {$gateways_arr[$dfltgwname]['gateway']}");
}
}
}

View File

@ -3425,10 +3425,10 @@ function interface_6rd_configure($interface = "wan", $wancfg) {
file_put_contents("{$g['tmp_path']}/{$wanif}_defaultgwv6", "{$rd6brgw}\n");
$ip4gateway = get_interface_gateway($interface);
if (is_ipaddrv4($ip4gateway))
if (is_ipaddrv4($ip4gateway)) {
mwexec("/sbin/route delete -host " . escapeshellarg($wancfg['gateway-6rd']));
mwexec("/sbin/route add -host " . escapeshellarg($wancfg['gateway-6rd']) . " {$ip4gateway}");
}
/* configure dependent interfaces */
if (!$g['booting'])
link_interface_to_track6($interface, "update");
@ -3523,10 +3523,11 @@ function interface_6to4_configure($interface = "wan", $wancfg){
file_put_contents("{$g['tmp_path']}/{$wanif}_defaultgwv6", "{$stfbrgw}");
$ip4gateway = get_interface_gateway($interface);
if (is_ipaddrv4($ip4gateway))
if (is_ipaddrv4($ip4gateway)) {
mwexec("/sbin/route delete -host 192.88.99.1");
mwexec("/sbin/route add -host 192.88.99.1 {$ip4gateway}");
}
if (!$g['booting'])
link_interface_to_track6($interface, "update");

View File

@ -550,12 +550,14 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
$cmd = " {$inet} {$blackhole} " . escapeshellarg($ip) . " ";
if (is_subnet($ip))
if (is_ipaddr($gatewayip))
if (is_ipaddr($gatewayip)) {
mwexec("/sbin/route delete".$cmd . escapeshellarg($gatewayip));
mwexec("/sbin/route add".$cmd . escapeshellarg($gatewayip));
else if (!empty($interfacegw))
}
else if (!empty($interfacegw)) {
mwexec("/sbin/route delete".$cmd . "-iface " . escapeshellarg($interfacegw));
mwexec("/sbin/route add".$cmd . "-iface " . escapeshellarg($interfacegw));
}
}
}
unset($gateways_arr);