mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[package] firewall: allow symbolic names of interfaces and aliases in masq_src and masq_dest
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27196 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -245,9 +245,17 @@ fw_load_zone() {
|
||||
if [ "$zone_masq" == 1 ]; then
|
||||
local msrc mdst
|
||||
for msrc in ${zone_masq_src:-0.0.0.0/0}; do
|
||||
fw_get_negation msrc '-s' "$msrc"
|
||||
case "$msrc" in
|
||||
*.*) fw_get_negation msrc '-s' "$msrc" ;;
|
||||
*) fw_get_subnet4 msrc '-s' "$msrc" ;;
|
||||
esac
|
||||
|
||||
for mdst in ${zone_masq_dest:-0.0.0.0/0}; do
|
||||
fw_get_negation mdst '-d' "$mdst"
|
||||
case "$mdst" in
|
||||
*.*) fw_get_negation mdst '-d' "$mdst" ;;
|
||||
*) fw_get_subnet4 mdst '-d' "$mdst" ;;
|
||||
esac
|
||||
|
||||
fw add $mode n ${chain}_nat MASQUERADE $ { $msrc $mdst }
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user