X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/cf123d2a166d297712ab7b7221af999a62643f98..23b9420c5594800bfcd88d47f9a7d6581857ac5a:/package/iptables/files/firewall.init diff --git a/package/iptables/files/firewall.init b/package/iptables/files/firewall.init index 731485bcd..04b37bdc4 100755 --- a/package/iptables/files/firewall.init +++ b/package/iptables/files/firewall.init @@ -2,12 +2,13 @@ # Copyright (C) 2006 OpenWrt.org ## Please make changes in /etc/firewall.user - +START=45 start() { include /lib/network scan_interfaces config_get WAN wan ifname + config_get WANDEV wan device config_get LAN lan ifname ## CLEAR TABLES @@ -25,6 +26,7 @@ start() { iptables -N LAN_ACCEPT [ -z "$WAN" ] || iptables -A LAN_ACCEPT -i "$WAN" -j RETURN + [ -z "$WANDEV" -o "$WANDEV" = "$WAN" ] || iptables -A LAN_ACCEPT -i "$WANDEV" -j RETURN iptables -A LAN_ACCEPT -j ACCEPT ### INPUT @@ -99,6 +101,7 @@ start() { ## USER RULES [ -f /etc/firewall.user ] && . /etc/firewall.user [ -n "$WAN" -a -e /etc/config/firewall ] && { + export WAN awk -f /usr/lib/common.awk -f /usr/lib/firewall.awk /etc/config/firewall | ash } }