mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-02 17:51:06 +02:00
fixes firewall rule generation. forwarding rules were inserted in input chains, fixes #4028
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12768 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
1d1f04a661
commit
23ab7d24d7
@ -216,10 +216,13 @@ fw_rule() {
|
|||||||
config_get proto $1 proto
|
config_get proto $1 proto
|
||||||
config_get target $1 target
|
config_get target $1 target
|
||||||
config_get ruleset $1 ruleset
|
config_get ruleset $1 ruleset
|
||||||
|
|
||||||
|
ZONE=input
|
||||||
|
TARGET=$target
|
||||||
[ -z "$target" ] && target=DROP
|
[ -z "$target" ] && target=DROP
|
||||||
[ -n "$src" ] && ZONE=zone_$src || ZONE=input
|
[ -n "$src" -a -z "$dest" ] && ZONE=zone_$src
|
||||||
[ -n "$dest" ] && TARGET=zone_${dest}_$target || TARGET=$target
|
[ -n "$src" -a -n "$dest" ] && ZONE=zone_${src}_forward
|
||||||
|
[ -n "$dest" ] && TARGET=zone_${dest}_$target
|
||||||
add_rule() {
|
add_rule() {
|
||||||
$IPTABLES -I $ZONE 1 \
|
$IPTABLES -I $ZONE 1 \
|
||||||
${proto:+-p $proto} \
|
${proto:+-p $proto} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user