www/squid: fix another bug due to netaddr/ipaddr switch

This commit is contained in:
Franco Fichtner
2024-05-21 08:37:52 +02:00
parent b64d2ec4c9
commit 9cf5ea1346
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
PLUGIN_NAME= squid
PLUGIN_VERSION= 1.0
PLUGIN_REVISION= 1
PLUGIN_REVISION= 2
PLUGIN_COMMENT= Squid is a caching proxy for the web
PLUGIN_DEPENDS= squid squid-langpack
PLUGIN_TIER= 2
+2
View File
@@ -8,3 +8,5 @@ Plugin Changelog
1.0
* Initial version based on the OPNsense 23.7.12 core code
* Workaround for segmentation faults using OpenSSL legacy provider
* Correct migration to Python ipaddress library use
@@ -51,11 +51,11 @@ function FindProxyForURL(url, host) {
{% endif %}
{% if match.match_type == 'destination_in_net' %}
{% set tmp_net = helpers.getIPNetwork(match.network) %}
{% set match_script = match_script + 'isInNet(dstip, "' + tmp_net.network.__str__() + '", "' + tmp_net.netmask.__str__() + '")' %}
{% set match_script = match_script + 'isInNet(dstip, "' + tmp_net.network_address.__str__() + '", "' + tmp_net.netmask.__str__() + '")' %}
{% endif %}
{% if match.match_type == 'my_ip_in_net' %}
{% set tmp_net = helpers.getIPNetwork(match.network) %}
{% set match_script = match_script + 'isInNet(myIpAddress(), "' + tmp_net.network.__str__() + '", "' + tmp_net.netmask.__str__() + '")' %}
{% set match_script = match_script + 'isInNet(myIpAddress(), "' + tmp_net.network_address.__str__() + '", "' + tmp_net.netmask.__str__() + '")' %}
{% endif %}
{% if match.match_type == 'plain_hostname' %}
{% set match_script = match_script + 'isPlainHostName(host)' %}