mirror of
https://gitlab.com/shorewall/code.git
synced 2025-05-10 19:14:49 +02:00
Add version of Jeremie Courreges-Anglas's <jca@tranquil.it> patch
- Handle case where we are enabling/disabling a balanced/fallback provider and another such provider has lost carrier. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5e57c895b3
commit
ae90ab1f68
@ -963,7 +963,7 @@ add_gateway() # $1 = Delta $2 = Table Number
|
|||||||
local delta
|
local delta
|
||||||
local dev
|
local dev
|
||||||
|
|
||||||
route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/default //; s/[\]//g'`
|
route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/default //; s/linkdown//g; s/[\]//g'`
|
||||||
|
|
||||||
if [ -z "$route" ]; then
|
if [ -z "$route" ]; then
|
||||||
run_ip route add default scope global table $2 $1
|
run_ip route add default scope global table $2 $1
|
||||||
@ -997,7 +997,7 @@ delete_gateway() # $! = Description of the Gateway $2 = table number $3 = device
|
|||||||
local gateway
|
local gateway
|
||||||
local dev
|
local dev
|
||||||
|
|
||||||
route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/[\]//g'`
|
route=`$IP -4 -o route ls table $2 | grep ^default | sed 's/linkdown//g; s/[\]//g'`
|
||||||
gateway=$1
|
gateway=$1
|
||||||
|
|
||||||
if [ -n "$route" ]; then
|
if [ -n "$route" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user