www/squid - remove format() call in helpers.getIPNetwork() for ipaddress compatibility. for https://github.com/opnsense/core/issues/7415

This commit is contained in:
Ad Schellevis
2024-04-27 19:10:27 +02:00
parent 3f4beb9656
commit 2e7acc10be
@@ -122,10 +122,10 @@ ftp_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.ftpPort }} accel ftp-tra
{% for interface in OPNsense.proxy.forward.interfaces.split(",") %}
{% for intf_key,intf_item in interfaces.items() %}
{% if intf_key == interface and intf_item.ipaddr and intf_item.ipaddr != 'dhcp' %}
acl localnet src {{ helpers.getIPNetwork(intf_item.ipaddr+'/'+intf_item.subnet)[0].format() }}/{{intf_item.subnet}} # Possible internal network (interfaces v4)
acl localnet src {{helpers.getIPNetwork(intf_item.ipaddr+'/'+intf_item.subnet)[0].__str__() }}/{{intf_item.subnet}} # Possible internal network (interfaces v4)
{% endif %}
{% if intf_key == interface and intf_item.ipaddrv6 and intf_item.ipaddrv6.find(':') > -1 %}
acl localnet src {{helpers.getIPNetwork(intf_item.ipaddrv6+'/'+intf_item.subnetv6)[0].format()}}/{{intf_item.subnetv6}} # Possible internal network (interfaces v6)
acl localnet src {{helpers.getIPNetwork(intf_item.ipaddrv6+'/'+intf_item.subnetv6)[0].__str__()}}/{{intf_item.subnetv6}} # Possible internal network (interfaces v6)
{% endif %}
{% endfor %}
{% if helpers.exists('virtualip.vip') %}