mwan3: improve route flushing on mwan3 stop
authorAaron Goodman <aaronjg@stanford.edu>
Sun, 13 Dec 2020 14:27:42 +0000 (09:27 -0500)
committerFlorian Eckert <fe@dev.tdt.de>
Wed, 16 Dec 2020 08:32:33 +0000 (09:32 +0100)
only attempt to flush routes for the relevant family

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
net/mwan3/files/etc/init.d/mwan3

index 743beb15274d3e9a3f934878afbfec6386ca4ccb..fe97b6a08ca886de7f4f8c0f37ee365951e6e14b 100755 (executable)
@@ -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