1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[package] firewall:

- simplify masquerade rule setup
	- remove various subshell invocations
	- speedup fw() by not relying on xargs and pipes
	- rework SNAT support - attach to dest zone, use src_dip/src_dport as snat source


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23024 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow
2010-09-11 20:04:34 +00:00
parent 7b3bd12cf8
commit c653713313
7 changed files with 114 additions and 94 deletions

View File

@@ -26,8 +26,8 @@ fw_load_rule() {
fw_callback pre rule
rule_src_port=$(fw_get_port_range $rule_src_port)
rule_dest_port=$(fw_get_port_range $rule_dest_port)
fw_get_port_range rule_src_port $rule_src_port
fw_get_port_range rule_dest_port $rule_dest_port
local chain=input
[ -n "$rule_src" ] && {
@@ -46,7 +46,8 @@ fw_load_rule() {
target=zone_${rule_dest}_${target}
}
local mode=$(fw_get_family_mode ${rule_family:-x} $rule_src I)
local mode
fw_get_family_mode mode ${rule_family:-x} $rule_src I
local rule_pos
eval 'rule_pos=$((++FW__RULE_COUNT_'$mode'_'$chain'))'