mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-27 00:29:02 +01:00
Remove backslashes from routes before processing them.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
f5c2e9b211
commit
6afd18646d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user