On Fri, 2011-09-02 at 17:18 +0300, Tuomo Soini wrote:
> # /var/lib/shorewall/firewall enable eth2
> Error: either "to" is duplicate, or "\" is a garbage.
>    ERROR: Command "ip -4 route replace default scope global table 253 \
> nexthop via 213.157.89.54 dev eth1 weight 3\ nexthop via 91.156.0.1 dev
> eth2 weight 2 nexthop via 91.156.0.1 dev eth2 weight 2" Failed
> 

This must be because we are using different shells since I am not seeing
this issue. Please see if the attached patch corrects the problem for
you.

Thanks,
-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________

diff --git a/Shorewall/Perl/prog.header b/Shorewall/Perl/prog.header
index 33a261b..8603d16 100644
--- a/Shorewall/Perl/prog.header
+++ b/Shorewall/Perl/prog.header
@@ -609,7 +609,7 @@ add_gateway() # $1 = Delta $2 = Table Number
     local weight
     local delta
     
-    route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/default //'`
+    route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/default //; s/[\]//g'`
 
     if [ -z "$route" ]; then
 	run_ip route add default scope global table $2 $1
@@ -639,7 +639,7 @@ delete_gateway() # $! = Description of the Gateway $2 = table number
     local gateway
     local newroute
 
-    route=`$IP -4 -o route ls table $2 | grep ^default`
+    route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/[\]//'`
     gateway=$1
   
     if [ -n "$route" ]; then

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to