X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/6ce96a49f3d83920be541b78bc68fb822de43c88..ddc9278d09957a5c6cb27ad0ca696f096476e38a:/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