summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-02-23 18:50:47 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-02-23 18:50:47 +0000
commitfe2d387a8c333db386df1df64c5870b33b436ee9 (patch)
tree0595b8f248393273bf74c74c8c450cc5e7312482
parentc3d47454b29682a55ee730e2a90156d3e3bc2543 (diff)
downloadmtk-20170518-fe2d387a8c333db386df1df64c5870b33b436ee9.zip
mtk-20170518-fe2d387a8c333db386df1df64c5870b33b436ee9.tar.gz
mtk-20170518-fe2d387a8c333db386df1df64c5870b33b436ee9.tar.bz2
firewall: bail out if uci is used in firewall include files
SVN-Revision: 30694
-rw-r--r--package/firewall/Makefile2
-rw-r--r--package/firewall/files/lib/core_init.sh8
2 files changed, 8 insertions, 2 deletions
diff --git a/package/firewall/Makefile b/package/firewall/Makefile
index 54cb8dc..b03fca8 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:=45
+PKG_RELEASE:=46
include $(INCLUDE_DIR)/package.mk
diff --git a/package/firewall/files/lib/core_init.sh b/package/firewall/files/lib/core_init.sh
index e93de16..0356479 100644
--- a/package/firewall/files/lib/core_init.sh
+++ b/package/firewall/files/lib/core_init.sh
@@ -288,7 +288,13 @@ fw_load_include() {
local path
config_get path ${name} path
- [ -e $path ] && ( . $path )
+ [ -e $path ] && (
+ config() {
+ fw_log error "You cannot use UCI in firewall includes!" >&2
+ exit 1
+ }
+ . $path
+ )
}