Check for ':' is redundant

Captive portal supports only ipv4, checking for ':' (ipv6) is therefore
redundant
This commit is contained in:
Fredrik Rönnvall 2019-02-11 13:04:10 +01:00
parent 54b9fb4874
commit 11ea61423e

View File

@ -115,7 +115,7 @@ add {{loop.index + 1000}} skipto 60000 icmp from any to { 255.255.255.255 or {{
# Allow traffic to this hosts VIPs
#======================================================================================
{% for item in virtualip.vip %}
{% if item.interface in cp_interface_list|sum(attribute="interfaces", start=[]) and ':' not in item.subnet %}
{% if item.interface in cp_interface_list|sum(attribute="interfaces", start=[]) %}
add {{loop.index + 2000}} skipto 60000 udp from any to {{ item.subnet }} dst-port 53 keep-state
add {{loop.index + 2000}} skipto 60000 ip from any to { 255.255.255.255 or {{item.subnet}} } in
add {{loop.index + 2000}} skipto 60000 ip from { 255.255.255.255 or {{item.subnet}} } to any out