Browse Source

mwan3: add migration script for flush_conntrack config

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 5 years ago
parent
commit
8d3c8dadcf
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      net/mwan3/files/etc/uci-defaults/mwan3-migrate-flush_conntrack

+ 26
- 0
net/mwan3/files/etc/uci-defaults/mwan3-migrate-flush_conntrack View File

@ -0,0 +1,26 @@
#!/bin/sh
. /lib/functions.sh
mwan3_migrate_flush_conntrack() {
local iface="$1"
config_get value "${iface}" flush_conntrack
case $value in
always)
uci_remove mwan3 "$iface" flush_conntrack
uci_add_list mwan3 "$iface" flush_conntrack ifup
uci_add_list mwan3 "$iface" flush_conntrack ifdown
;;
never)
uci_remove mwan3 "$iface" flush_conntrack
;;
esac
uci_commit mwan3
}
config_load mwan3
config_foreach mwan3_migrate_flush_conntrack interface
exit 0

Loading…
Cancel
Save