(ipfw) add check to ignore empty interface

This commit is contained in:
Ad Schellevis 2015-07-02 16:34:38 +02:00
parent 6b3e4af7dc
commit ea948fa3f1

View File

@ -75,7 +75,7 @@ add 203 skipto 60000 ipv4 from any to 127.0.0.0/8
# Allow traffic to this hosts static ip's
#======================================================================================
{% for intf_key,interface in interfaces.iteritems() %}
{% if intf_key != "wan" and interface.ipaddr != "dhcp" and interface.ipaddr != "" %}
{% if intf_key != "wan" and interface.ipaddr != "dhcp" and interface.ipaddr|default("") != "" %}
add {{loop.index + 1000}} skipto 60000 udp from any to {{ interface.ipaddr }} dst-port 53 keep-state
add {{loop.index + 1000}} skipto 60000 ip from any to { 255.255.255.255 or {{interface.ipaddr}} } in
add {{loop.index + 1000}} skipto 60000 ip from { 255.255.255.255 or {{interface.ipaddr}} } to any out