From: Aaron Goodman Date: Sun, 13 Dec 2020 14:27:42 +0000 (-0500) Subject: mwan3: improve route flushing on mwan3 stop X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=24e1504b0b6040b70e9f1de4df6d6af899c0f4a3;p=openwrt-packages.git mwan3: improve route flushing on mwan3 stop only attempt to flush routes for the relevant family Signed-off-by: Aaron Goodman --- diff --git a/net/mwan3/files/etc/init.d/mwan3 b/net/mwan3/files/etc/init.d/mwan3 index 743beb152..fe97b6a08 100755 --- a/net/mwan3/files/etc/init.d/mwan3 +++ b/net/mwan3/files/etc/init.d/mwan3 @@ -72,7 +72,7 @@ stop_service() { IP="$IP6" fi - for tid in $(ip route list table all | sed -ne 's/.*table \([0-9]\+\).*/\1/p' | sort -u); do + for tid in $($IP route list table all | sed -ne 's/.*table \([0-9]\+\).*/\1/p' | sort -u); do [ $tid -gt $MWAN3_INTERFACE_MAX ] && continue $IP route flush table $tid &> /dev/null done