mwan3: improve route flushing on mwan3 stop

only attempt to flush routes for the relevant family

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
Aaron Goodman 2020-12-13 09:27:42 -05:00 committed by Florian Eckert
parent 21ac1b2c3e
commit 24e1504b0b

View file

@ -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