core changes - refactor intf_item.type usage as referred to in https://github.com/opnsense/core/issues/6181

This commit is contained in:
Ad Schellevis 2022-12-21 13:31:25 +01:00
parent 2c667a0284
commit 39985f0c1d
3 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@
{% endif %}
{% if helpers.exists('virtualip') %}
{% for intf_item in helpers.toList('virtualip.vip') %}
{% if intf_item.interface == listen_interface and intf_item.type == 'single' %}
{% if intf_item.interface == listen_interface and intf_item.mode in ['carp', 'ipalias'] %}
{% if intf_item.subnet.find(':') > -1 %}
{% do listen_ip.append(interface_ip) %}
{% else %}

View File

@ -27,7 +27,7 @@ SOCKSPort [{{ interface_ip }}]:{{ OPNsense.tor.general.socks_listen_port|default
{% endif %}
{% if helpers.exists('virtualip') %}
{% for intf_item in helpers.toList('virtualip.vip') %}
{% if intf_item.interface == listen_interface and intf_item.type == 'single' %}
{% if intf_item.interface == listen_interface and intf_item.mode in ['carp', 'ipalias'] %}
{% if intf_item.subnet.find(':') > -1 %}
# {{ listen_interface }}: IPv6 VIP
SOCKSPort [{{ intf_item.subnet }}]:{{ OPNsense.tor.general.socks_listen_port|default('9050') }}

View File

@ -147,7 +147,7 @@ server {
{% endfor %}
{% if helpers.exists('virtualip') %}
{% for intf_item in helpers.toList('virtualip.vip') %}
{% if intf_item.type == 'single' %}
{% if intf_item.mode in ['carp', 'ipalias'] %}
{% set cidr = intf_item.subnet + '/' + intf_item.subnet_bits %}
{% if cidr not in whitelisted_networks %}
allow {{ cidr }};