From 24e1504b0b6040b70e9f1de4df6d6af899c0f4a3 Mon Sep 17 00:00:00 2001 From: Aaron Goodman Date: Sun, 13 Dec 2020 09:27:42 -0500 Subject: [PATCH] mwan3: improve route flushing on mwan3 stop only attempt to flush routes for the relevant family Signed-off-by: Aaron Goodman --- net/mwan3/files/etc/init.d/mwan3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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