firewall: bail out if uci is used in firewall include files
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 23 Feb 2012 18:50:47 +0000 (18:50 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 23 Feb 2012 18:50:47 +0000 (18:50 +0000)
SVN-Revision: 30694

package/firewall/Makefile
package/firewall/files/lib/core_init.sh

index 54cb8dc4a9908032462631c96ae7a40a97cf67b7..b03fca8a039a2fcd3bd09c8f21ac6332626e4ae8 100644 (file)
@@ -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
 
index e93de1613ff091f9236eecea61ad07b0016584bc..035647998ef9cec48af43b583b05473c5a3b03a2 100644 (file)
@@ -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 
+       )
 }