mwan3: add migration script for flush_conntrack config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 8d3c8dadcf
)
This commit is contained in:
parent
779869469a
commit
3f088f2535
2 changed files with 27 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mwan3
|
PKG_NAME:=mwan3
|
||||||
PKG_VERSION:=2.7.13
|
PKG_VERSION:=2.7.14
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
|
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
|
||||||
PKG_LICENSE:=GPLv2
|
PKG_LICENSE:=GPLv2
|
||||||
|
|
|
@ -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…
Reference in a new issue