diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-05-01 18:39:53 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-05-01 18:39:53 +0200 |
commit | a30209ae0be3d0f1df37a30dbe73d10d3f3ec8cb (patch) | |
tree | 9d5433f426a0a5ff4230c2eff627062803f0d4e0 /data/templates/conntrackd/conntrackd.op-mode.j2 | |
parent | 2f507669fd7f7fc9c00ae2302c4f062c48e24706 (diff) | |
download | vyos-1x-a30209ae0be3d0f1df37a30dbe73d10d3f3ec8cb.tar.gz vyos-1x-a30209ae0be3d0f1df37a30dbe73d10d3f3ec8cb.zip |
conntrackd: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/conntrackd/conntrackd.op-mode.j2')
-rw-r--r-- | data/templates/conntrackd/conntrackd.op-mode.j2 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/conntrackd/conntrackd.op-mode.j2 b/data/templates/conntrackd/conntrackd.op-mode.j2 new file mode 100644 index 000000000..82f7e2859 --- /dev/null +++ b/data/templates/conntrackd/conntrackd.op-mode.j2 @@ -0,0 +1,13 @@ +Source Destination Protocol +{% for parsed in data if parsed.flow.meta is vyos_defined %} +{% for key in parsed.flow.meta %} +{% if key['@direction'] == 'original' %} +{% set saddr = key.layer3.src | bracketize_ipv6 %} +{% set sport = key.layer4.sport %} +{% set daddr = key.layer3.dst | bracketize_ipv6 %} +{% set dport = key.layer4.dport %} +{% set protocol = key.layer4['@protoname'] %} +{{ "%-48s" | format(saddr ~ ':' ~ sport) }} {{ "%-48s" | format(daddr ~ ':' ~ dport) }} {{ protocol }} +{% endif %} +{% endfor %} +{% endfor %} |