Commit d2fa9a54 authored by Jos Schellevis's avatar Jos Schellevis

Default gateway is removed and added instead of changed, solves #17

parent 024173bf
......@@ -456,8 +456,10 @@ function system_routing_configure($interface = '')
if (!empty($interface) && $interface != $interfacegw)
;
else if (is_ipaddrv4($gatewayip)) {
log_error("ROUTING: remove current default route to $gatewayip");
mwexec("/sbin/route delete default");
log_error("ROUTING: setting default route to $gatewayip");
mwexec("/sbin/route change -inet default " . escapeshellarg($gatewayip));
mwexec("/sbin/route add -inet default " . escapeshellarg($gatewayip));
}
if (!empty($interface) && $interface != $interfacegwv6)
......
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