From 6afd18646dd258808232efdf5b943f3dc4b6b345 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 2 Sep 2011 08:41:15 -0700 Subject: [PATCH] Remove backslashes from routes before processing them. Signed-off-by: Tom Eastep --- Shorewall/Perl/prog.header | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/prog.header b/Shorewall/Perl/prog.header index 33a261b51..8603d1684 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