From: Jo-Philipp Wich Date: Wed, 30 Mar 2011 20:29:17 +0000 (+0000) Subject: firewall: prevent duplicate values in interface state vars X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=af82471525ca97845f0c1550a4203a15d9402995;p=openwrt%2Fstaging%2Fthess.git firewall: prevent duplicate values in interface state vars SVN-Revision: 26382 --- diff --git a/package/firewall/Makefile b/package/firewall/Makefile index 15237ff8f4..ea407f081b 100644 --- a/package/firewall/Makefile +++ b/package/firewall/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=firewall PKG_VERSION:=2 -PKG_RELEASE:=23 +PKG_RELEASE:=24 include $(INCLUDE_DIR)/package.mk diff --git a/package/firewall/files/lib/core_interface.sh b/package/firewall/files/lib/core_interface.sh index aff6641807..ed6a4b150f 100644 --- a/package/firewall/files/lib/core_interface.sh +++ b/package/firewall/files/lib/core_interface.sh @@ -4,7 +4,10 @@ fw__uci_state_add() { local var="$1" local item="$2" - local val="$(uci_get_state firewall core $var)" + local val=" $(uci_get_state firewall core $var) " + val="${val// $item / }" + val="${val# }" + val="${val% }" uci_set_state firewall core $var "${val:+$val }$item" }