diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-07-02 16:50:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 16:50:33 +0200 |
commit | 21527ef4551613fe9b7eed9e4b2ce33ad46fe540 (patch) | |
tree | 59219bc423e0b53e5c39f697c5696d18d676e60b /data/templates/conntrackd/conntrackd.op-mode.tmpl | |
parent | cef8147afd1d031c91cc90b7642aad8ae372c81b (diff) | |
parent | 4e1a5c7cf4213fd5617e387a2d4a6d1e9a475c54 (diff) | |
download | vyos-1x-21527ef4551613fe9b7eed9e4b2ce33ad46fe540.tar.gz vyos-1x-21527ef4551613fe9b7eed9e4b2ce33ad46fe540.zip |
Merge pull request #904 from sever-sever/T3535
conntrack-sync: T3535: Rewrite conf and op modes to XML python style
Diffstat (limited to 'data/templates/conntrackd/conntrackd.op-mode.tmpl')
-rw-r--r-- | data/templates/conntrackd/conntrackd.op-mode.tmpl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/conntrackd/conntrackd.op-mode.tmpl b/data/templates/conntrackd/conntrackd.op-mode.tmpl new file mode 100644 index 000000000..82a4b09ad --- /dev/null +++ b/data/templates/conntrackd/conntrackd.op-mode.tmpl @@ -0,0 +1,13 @@ +Source Destination Protocol +{% for parsed in data if parsed.flow is defined and parsed.flow.meta is 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 %} |