Page 1 of 1

Repo: Handle 0.0.0.0 gateways properly in static routes

Posted: Tue Apr 12, 2011 5:32 pm
by behappy
Hi Eric,

Those commands below are valid in iptables
- route add -net 192.168.1.0 netmask 255.255.255.0 eth1
- route add default gw 192.168.1.1

Converted to GUI

Current Static Routes:
Destination---------------------Interface------Gateway
192.168.1.0/255.255.255.0-wan-------------0.0.0.0
0.0.0.0/0.0.0.0----------------wan-------------192.168.1.1

I've checked the new codes; gw is now handled correct, but still invalid w. destination part 0.0.0.0/0.0.0.0

Re: Repo: Handle 0.0.0.0 gateways properly in static routes

Posted: Wed Apr 13, 2011 8:22 am
by Eric
Ah, I see -- the 0.0.0.0/0 IP sets the default route, just like the 0.0.0.0 gateway sets the default gateway. Thanks for pointing this out.

For most things 0.0.0.0 isn't going to be a valid IP, so the error stems from using the default error checking code (in both the case of the destination and gateway). Shouldn't be too hard to fix though.