mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
(trafficshaper) change meaning of direction + dual interfaces, doesn't match the correct traffic at the moment
This commit is contained in:
parent
9871f0ba80
commit
dbad45a3b3
@ -153,20 +153,24 @@ add 60000 return via any
|
||||
%}
|
||||
{% if rule.interface2 and helpers.getNodeByTag('interfaces.'+rule.interface2) %}
|
||||
{# 2 interface defined, use both to match packets (2 rules) #}
|
||||
{% if rule.direction == 'in' or rule.direction == 'both' %}
|
||||
add {{loop.index + 60000}} {{ helpers.getUUIDtag(rule.target) }} {{
|
||||
helpers.getUUID(rule.target).number }} {{ rule.proto.split('_')[0] }} from {{ rule.source }} to {{rule.destination
|
||||
}} src-port {{ rule.src_port }} dst-port {{ rule.dst_port }} {{rule.direction}} recv {{
|
||||
}} src-port {{ rule.src_port }} dst-port {{ rule.dst_port }} recv {{
|
||||
helpers.getNodeByTag('interfaces.'+rule.interface).if }} {%
|
||||
if rule.proto.split('_')[1]|default('') == 'ack' %} {{ rule.proto.split('_')[2]|default('') }} tcpflags ack {% endif
|
||||
%} xmit {{helpers.getNodeByTag('interfaces.'+rule.interface2).if
|
||||
}}
|
||||
{% endif %}
|
||||
{% if rule.direction == 'out' or rule.direction == 'both' %}
|
||||
add {{loop.index + 60000}} {{ helpers.getUUIDtag(rule.target) }} {{
|
||||
helpers.getUUID(rule.target).number }} {{ rule.proto.split('_')[0] }} from {{ rule.source }} to {{rule.destination
|
||||
}} src-port {{ rule.src_port }} dst-port {{ rule.dst_port }} {{rule.direction}} xmit {{
|
||||
}} src-port {{ rule.src_port }} dst-port {{ rule.dst_port }} xmit {{
|
||||
helpers.getNodeByTag('interfaces.'+rule.interface).if }} {%
|
||||
if rule.proto.split('_')[1]|default('') == 'ack' %} {{ rule.proto.split('_')[2]|default('') }} tcpflags ack {% endif
|
||||
%} recv {{helpers.getNodeByTag('interfaces.'+rule.interface2).if
|
||||
}}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{# normal, single interface situation #}
|
||||
add {{loop.index + 60000}} {{ helpers.getUUIDtag(rule.target) }} {{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user