mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
mwan3: fix linkdown routes not being added
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
committed by
Florian Eckert
parent
6ccb14a379
commit
5691ff247f
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user