From a6f879fcdff23b40ea1546b8e0242bb7e1e225fe Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 20 Jul 2015 08:46:13 +0000 Subject: [PATCH] fix for https://github.com/opnsense/core/issues/264 when a conditional is the last stament on the line, either make sure there's an extra new line or add some characters behind it. "trim_blocks" is removing this new line otherwise (http://jinja.pocoo.org/docs/dev/api/#basics). --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 611884fa7..f21f54aab 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -8,6 +8,7 @@ {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} http_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense.proxy.forward.transparentMode == '1' %}intercept{% endif %} + {% endif %} {% endfor %} {# virtual ip's #} @@ -15,6 +16,7 @@ http_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense. {% for intf_key,intf_item in virtualip.iteritems() %} {% if intf_item.interface == interface and intf_item.mode == 'ipalias' %} http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense.proxy.forward.transparentMode == '1' %}intercept{% endif %} + {% endif %} {% endfor %} {% endif %} @@ -27,6 +29,7 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense. {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} ftp_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.ftpPort }} {%if OPNsense.proxy.forward.ftpTransparentMode == '1' %}intercept{% else %}accel ftp-track-dirs protocol=HTTP{% endif %} + {% endif %} {% endfor %} {# virtual ip's #} @@ -34,6 +37,7 @@ ftp_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.ftpPort }} {%if OPNsens {% for intf_key,intf_item in virtualip.iteritems() %} {% if intf_item.interface == interface and intf_item.mode == 'ipalias' %} ftp_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.ftpPort }} {%if OPNsense.proxy.forward.ftpTransparentMode == '1' %}intercept{% else %}accel ftp-track-dirs protocol=HTTP{% endif %} + {% endif %} {% endfor %} {% endif %}