mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
mwan3: change flush_conntrack handling to use uci list element
With this change it is now possible to combine interface action events. If an interface action is generated by netifd or mwan3 for example ifup, ifdown, connectd or disconnected and this action is configured in the inteface uci section, then the conntrack table is flushed by mwan3. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -79,7 +79,6 @@ case "$ACTION" in
|
||||
fi
|
||||
mwan3_set_policies_iptables
|
||||
mwan3_set_user_rules
|
||||
mwan3_flush_conntrack $INTERFACE $DEVICE "ifup"
|
||||
;;
|
||||
ifdown)
|
||||
mwan3_set_iface_hotplug_state $INTERFACE "offline"
|
||||
@@ -87,7 +86,6 @@ case "$ACTION" in
|
||||
mwan3_track_signal $INTERFACE $DEVICE
|
||||
mwan3_set_policies_iptables
|
||||
mwan3_set_user_rules
|
||||
mwan3_flush_conntrack $INTERFACE $DEVICE "ifdown"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -14,4 +14,9 @@ if [ "$ACTION" == "ifup" ]; then
|
||||
mwan3_unlock "$ACTION" "mwan3rtmon"
|
||||
fi
|
||||
|
||||
config_get enabled $INTERFACE enabled 0
|
||||
[ "${enabled}" = "0" ] || {
|
||||
mwan3_flush_conntrack "$INTERFACE" "$ACTION"
|
||||
}
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user