|
From: Bruce S. <bw...@ar...> - 2004-04-24 00:39:20
|
I upgraded a firewall of mine and all the static route commands bombed.
After a little looking it appeared that the "if" statement below was
backwards, so I swapped the logic. I didn't spend a lot of time looking
at the logic of the code, only the results of my routes (which now work)
I hope I didn't screw it up too bad, Friedrich! :-)
- BS
> Log Message:
> Fix static routes with full subnet mask not working.
>
>
> Index: network
> ===================================================================
> RCS file: /cvsroot/devil-linux/build/config/etc/init.d/network,v
> retrieving revision 1.31
> retrieving revision 1.32
> diff -u -d -r1.31 -r1.32
> --- network 10 Apr 2004 00:14:49 -0000 1.31
> +++ network 23 Apr 2004 21:12:40 -0000 1.32
> @@ -263,7 +263,7 @@
> fi
>
> # add the route
> - if [ -n "${netmask##*.*}" ]; then
> + if [ -z "${netmask##*.*}" ]; then
> echo " adding route to $CMD ${target}${netmask:+/$netmask}${gateway:+ via gateway $gateway} on $DEVICE"
> route add -$CMD ${target} ${netmask:+netmask $netmask} ${gateway:+gw $gateway} dev $DEVICE
> else
|