If the supplied gateway is all ones(255.255.255.255) do not report it as a gateway since its useless.

This commit is contained in:
Ermal 2011-04-06 10:42:21 +00:00
parent 262595f0d5
commit 5766add891

View File

@ -192,7 +192,10 @@ add_new_routes() {
if [ "$new_ip_address" = "$router" -o "$router" = "255.255.255.255" ]; then
$ROUTE add default -iface $interface
echo $ROUTE add default -iface $interface | $LOGGER
echo $router > /tmp/${interface}_router
# NOTE: Do not activate this for all ones address since pf(4) will try to forward packets to it.
if [ "$new_ip_address" = "$router" ]; then
echo $router > /tmp/${interface}_router
fi
else
$ROUTE add default $router
echo $ROUTE add default $router | $LOGGER