firewall: merge r28628
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 27 Oct 2011 23:50:40 +0000 (23:50 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 27 Oct 2011 23:50:40 +0000 (23:50 +0000)
SVN-Revision: 28644

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

index 5978068fc593cfef093ae6cdf3b05e01233d6c77..90a6eae67bb244300c059182366eadf47bd3689f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=firewall
 
 PKG_VERSION:=2
-PKG_RELEASE:=34.4
+PKG_RELEASE:=34.5
 
 include $(INCLUDE_DIR)/package.mk
 
index 185fffb98bcf7bd38653b6222c857df01718f626..87f40e0820f66bc4fe48607a1d7e681022d015fd 100644 (file)
@@ -247,13 +247,13 @@ fw_load_zone() {
                for msrc in ${zone_masq_src:-0.0.0.0/0}; do
                        case "$msrc" in
                                *.*) fw_get_negation msrc '-s' "$msrc" ;;
-                               *)   fw_get_subnet4 msrc '-s' "$msrc" ;;
+                               *)   fw_get_subnet4 msrc '-s' "$msrc" || break ;;
                        esac
 
                        for mdst in ${zone_masq_dest:-0.0.0.0/0}; do
                                case "$mdst" in
                                        *.*) fw_get_negation mdst '-d' "$mdst" ;;
-                                       *)   fw_get_subnet4 mdst '-d' "$mdst" ;;
+                                       *)   fw_get_subnet4 mdst '-d' "$mdst" || break ;;
                                esac
 
                                fw add $mode n ${chain}_nat MASQUERADE $ { $msrc $mdst }
index 7922d222f8da6e38b0529cac06eeb64de411780b..0814ffc315506ac2ea7a3f231a813f80ad6605fe 100644 (file)
@@ -255,9 +255,12 @@ fw_get_subnet4() {
                        [ "${_name#!}" != "$_name" ] && \
                                export -n -- "$_var=! $_flag $_ipaddr/${_netmask:-255.255.255.255}" || \
                                export -n -- "$_var=$_flag $_ipaddr/${_netmask:-255.255.255.255}"
+                       return 0
                ;;
-               *) export -n -- "$_var=" ;;
        esac
+
+       export -n -- "$_var="
+       return 1
 }
 
 fw_check_icmptype4() {