projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b56d5cc
)
fixes firewall rule generation. forwarding rules were inserted in input chains, fixes...
author
John Crispin
<john@openwrt.org>
Sun, 28 Sep 2008 17:40:09 +0000
(17:40 +0000)
committer
John Crispin
<john@openwrt.org>
Sun, 28 Sep 2008 17:40:09 +0000
(17:40 +0000)
SVN-Revision: 12768
package/firewall/files/uci_firewall.sh
patch
|
blob
|
history
diff --git
a/package/firewall/files/uci_firewall.sh
b/package/firewall/files/uci_firewall.sh
index 5798b7fc48bb617e07493a84858a53fd2efa2db8..0f7e2ff0580e51f80ee71515f4a670f43327c60d 100755
(executable)
--- a/
package/firewall/files/uci_firewall.sh
+++ b/
package/firewall/files/uci_firewall.sh
@@
-216,10
+216,13
@@
fw_rule() {
config_get proto $1 proto
config_get target $1 target
config_get ruleset $1 ruleset
config_get proto $1 proto
config_get target $1 target
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 "$dest" ] && TARGET=zone_${dest}_$target || TARGET=$target
+ [ -n "$src" -a -z "$dest" ] && ZONE=zone_$src
+ [ -n "$src" -a -n "$dest" ] && ZONE=zone_${src}_forward
+ [ -n "$dest" ] && TARGET=zone_${dest}_$target
add_rule() {
$IPTABLES -I $ZONE 1 \
${proto:+-p $proto} \
add_rule() {
$IPTABLES -I $ZONE 1 \
${proto:+-p $proto} \