mwan3: improvements to route creation

handle creation of routing tables in mwan3rtmon to avoid race
conditions and potentially missing routes

handle ipv6 routes that have expiry

update directly connected ipset when routes are added or deleted

add fall through rules so that the default routing table is not
used if no rule in the interface-specific routing table matches

add option to comply with mwan3 source based routing

get default route parameters from main routing table

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
Aaron Goodman
2020-08-15 19:58:55 -04:00
parent 27492f64f8
commit c8deccc0e7
4 changed files with 191 additions and 188 deletions
+3 -4
View File
@@ -33,8 +33,8 @@ $IPT4 -S mwan3_hook &>/dev/null || {
mwan3_init
[ "$MWAN3_STARTUP" = 1 ] || {
mwan3_set_connected_iptables
mwan3_set_custom_ipset
config_get family $INTERFACE family ipv4
mwan3_set_connected_${family}
}
if [ "$MWAN3_STARTUP" != 1 ]; then
@@ -68,8 +68,7 @@ case "$ACTION" in
ifup|connected)
mwan3_create_iface_iptables $INTERFACE $DEVICE
mwan3_create_iface_rules $INTERFACE $DEVICE
mwan3_create_iface_route $INTERFACE $DEVICE
[ "$MWAN3_STARTUP" != 1 ] && mwan3_add_non_default_iface_route $INTERFACE $DEVICE
[ "$MWAN3_STARTUP" != 1 ] && mwan3_create_iface_route $INTERFACE $DEVICE
mwan3_set_iface_hotplug_state $INTERFACE "$binary_status"
mwan3_get_src_ip src_ip "$TRUE_INTERFACE"