aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-03-30 20:29:17 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-03-30 20:29:17 +0000
commit506e7cb67a9c02d4d25182518c7b2a8ac08d25e1 (patch)
tree46f0fdf9096b7eea9e2d77f9f11b96f16f64ad61 /package
parent10bb6c326a8e4573ec61ba5979af4ced740708b2 (diff)
downloadmaster-187ad058-506e7cb67a9c02d4d25182518c7b2a8ac08d25e1.tar.gz
master-187ad058-506e7cb67a9c02d4d25182518c7b2a8ac08d25e1.tar.bz2
master-187ad058-506e7cb67a9c02d4d25182518c7b2a8ac08d25e1.zip
[package] firewall: prevent duplicate values in interface state vars
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26382 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/firewall/Makefile2
-rw-r--r--package/firewall/files/lib/core_interface.sh5
2 files changed, 5 insertions, 2 deletions
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"
}