diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-12-24 13:45:04 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-12-24 13:45:04 +0100 |
commit | 9ff9a1c7d42a74b6ef628ed684b0594576516d5f (patch) | |
tree | d298e4a4b9cac92c00a116a2367ea9f016c2c60b /etc | |
parent | d9d4c637830257d3572fcb73e97a0d10dc5682cf (diff) | |
download | pfsense-9ff9a1c7d42a74b6ef628ed684b0594576516d5f.zip pfsense-9ff9a1c7d42a74b6ef628ed684b0594576516d5f.tar.gz |
Style fixes for the interfaces page, use switch instead of a large if,elseif procedure.
Fix the monitor IP route adding and removing to skip non IP addresses and dynamic entries
Add a Gateway item on the gateway_item stack so that it properly shows up in th configuration. Static configurations will need to
manually add one.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/gwlb.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 94ce050..92eaf28 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -163,11 +163,11 @@ EOD; * route as this will break the routing table */ continue; } else { - mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor'])); - if(! stristr("127.0.0", $gateway['gateway'])) { + if(($gateway['gateway'] != "dynamic") && (is_ipaddr($gateway['gateway']))) { + mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor'])); mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) . " " . escapeshellarg($gateway['gateway'])); - log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}"); + log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}"); } } } |