mwan3: fix linkdown routes not being added

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
Aaron Goodman
2020-12-12 08:45:53 -05:00
committed by Florian Eckert
parent 6ccb14a379
commit 5691ff247f
3 changed files with 10 additions and 11 deletions
+3
View File
@@ -129,6 +129,9 @@ mwan3_init()
LOG debug "Max interface count is ${MWAN3_INTERFACE_MAX}"
fi
# remove "linkdown", expiry and source based routing modifiers from route lines
MWAN3_ROUTE_LINE_EXP="s/linkdown //; s/expires [0-9]\+sec//;s/error [0-9]\+//; ${source_routing:+s/default\(.*\) from [^ ]*/default\1/;} p"
# mark mask constants
bitcnt=$(mwan3_count_one_bits MMX_MASK)
mmdefault=$(((1<<bitcnt)-1))
+1 -1
View File
@@ -413,7 +413,7 @@ mwan3_get_routes()
local source_routing
config_get_bool source_routing globals source_routing 0
[ $source_routing -eq 0 ] && unset source_routing
$IP route list table main | sed -ne "/^linkdown/T; s/expires \([0-9]\+\)sec//;s/error [0-9]\+//; ${source_routing:+s/default\(.*\) from [^ ]*/default\1/;} p" | uniq
$IP route list table main | sed -ne "$MWAN3_ROUTE_LINE_EXP" | uniq
}
mwan3_create_iface_route()