diff options
author | Ermal <eri@pfsense.org> | 2010-05-17 11:56:07 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-17 11:56:07 +0000 |
commit | 79f30c1c6b273ea6e1a8dc209982f9bbb3b8f84d (patch) | |
tree | e5c913187ed0da4ddf6035e4c3480329db97f055 /etc/inc/system.inc | |
parent | b61154fbf9bd480ba78c51baaee408854bfbaec3 (diff) | |
download | pfsense-79f30c1c6b273ea6e1a8dc209982f9bbb3b8f84d.zip pfsense-79f30c1c6b273ea6e1a8dc209982f9bbb3b8f84d.tar.gz |
Do not throw the error message unnecerssarily. It is legal on 2.0 to not specify default gw on 2.0 with pppoe/pptp links specified.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 41f3b8b..c3502c8 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -295,7 +295,7 @@ function system_routing_configure() { $route_arr[$item[0]] = array($items[0], $items[1], $items[5]); } - if($dont_add_route == false) { + if ($dont_add_route == false) { if (($interfacegw <> "bgpd") && (is_ipaddr($gatewayip))) { $action = "add"; if(isset($route_arr['default'])) { @@ -303,16 +303,14 @@ function system_routing_configure() { } log_error("ROUTING: $action default route to $gatewayip"); mwexec("/sbin/route {$action} default " . escapeshellarg($gatewayip)); - } else { + } else if (is_ipaddr($config['interfaces']['wan']['gateway'])) { /* Adding gateway for 1.2-style configs without the new * gateway setup configured. * Force WAN to be default gateway because that is the 1.2 behavior. */ log_error("WARNING: There is no default gateway in the configuration."); - if (is_ipaddr($config['interfaces']['wan']['gateway'])) { - $gatewayip = $config['interfaces']['wan']['gateway']; - mwexec("/sbin/route add default " . escapeshellarg($gatewayip), true); - } + $gatewayip = $config['interfaces']['wan']['gateway']; + mwexec("/sbin/route add default " . escapeshellarg($gatewayip), true); } } |