From: htouvet <htouvet-git...@tranquil.it> Newish iproute2 print "linkdown" when the link state of the interface associated with a route is down. This breaks multi-providers operations. As a quickfix, tweak add/remove_gateway to strip "linkdown" from ip route output. This diff does not address IPv6 handling, which also looks affected.
Signed-off-by: htouvet <htouvet-git...@tranquil.it> Signed-off-by: Jeremie Courreges-Anglas <j...@tranquil.it> --- Shorewall/Perl/lib.runtime | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/lib.runtime b/Shorewall/Perl/lib.runtime index 84f0f92f0..781adce76 100644 --- a/Shorewall/Perl/lib.runtime +++ b/Shorewall/Perl/lib.runtime @@ -963,7 +963,7 @@ add_gateway() # $1 = Delta $2 = Table Number local delta 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/[\]//g; s/linkdown//'` if [ -z "$route" ]; then 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 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/[\]//g; s/linkdown//'` gateway=$1 if [ -n "$route" ]; then -- 2.11.0 _______________________________________________ Shorewall-devel mailing list Shorewall-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-devel