summaryrefslogtreecommitdiff
path: root/package/firewall/files/lib/fw.sh
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-27 18:14:55 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-27 18:14:55 +0000
commitcd1d712a7c5ed432b709004e99b7208a1c88728e (patch)
tree680b50930b4b6e5b43170374bd7d70198e488e54 /package/firewall/files/lib/fw.sh
parent1be3566612cddfea7d96e81c07379a26f7d8225c (diff)
[package] firewall: do not produce 0.0.0.0/0 if a symbolic masq_src or masq_dest is given but does not resolve to an ip
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28628 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall/files/lib/fw.sh')
-rw-r--r--package/firewall/files/lib/fw.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/firewall/files/lib/fw.sh b/package/firewall/files/lib/fw.sh
index 7922d222f8..0814ffc315 100644
--- a/package/firewall/files/lib/fw.sh
+++ b/package/firewall/files/lib/fw.sh
@@ -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() {