From 1efeaa35d1f86cc6e962180db9e90fc7f1698061 Mon Sep 17 00:00:00 2001 From: jow Date: Tue, 28 Sep 2010 10:42:56 +0000 Subject: [package] fireall: - support negations for src_ip, dest_ip, src_dip options in rules and redirects - add NOTRACK target to rule sections, allows to define fine grained notrack rules git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23141 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/firewall/files/lib/core_init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/firewall/files/lib/core_init.sh') diff --git a/package/firewall/files/lib/core_init.sh b/package/firewall/files/lib/core_init.sh index 56e19b7b8..c7e41e7ff 100644 --- a/package/firewall/files/lib/core_init.sh +++ b/package/firewall/files/lib/core_init.sh @@ -245,9 +245,9 @@ fw_load_zone() { if [ "$zone_masq" == 1 ]; then local msrc mdst for msrc in ${zone_masq_src:-0.0.0.0/0}; do - [ "${msrc#!}" != "$msrc" ] && msrc="! -s ${msrc#!}" || msrc="-s $msrc" + fw_get_negation msrc '-s' "$msrc" for mdst in ${zone_masq_dest:-0.0.0.0/0}; do - [ "${mdst#!}" != "$mdst" ] && mdst="! -d ${mdst#!}" || mdst="-d $mdst" + fw_get_negation mdst '-d' "$mdst" fw add $mode n ${chain}_nat MASQUERADE $ { $msrc $mdst } done done -- cgit v1.2.3