summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-03-19 18:01:31 +0100
committerGitHub <noreply@github.com>2024-03-19 18:01:31 +0100
commit8be1318b9ed6a8d18e0d854f9d3d4751b3bacacc (patch)
treef2fd1d9db3dd91d19283717cb57ed55515b22289
parentd2f341739e7d8e941b61ed00fe21b990cb2e0b26 (diff)
parentc5e52627e4a81a488ed63006065fce0b0af2b65f (diff)
downloadvyos-1x-8be1318b9ed6a8d18e0d854f9d3d4751b3bacacc.tar.gz
vyos-1x-8be1318b9ed6a8d18e0d854f9d3d4751b3bacacc.zip
Merge pull request #3152 from vyos/mergify/bp/sagitta/pr-3150
T6138: Fix op-mode show conntrack table with flowtable offloads (backport #3150)
-rwxr-xr-xsrc/op_mode/conntrack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/conntrack.py b/src/op_mode/conntrack.py
index cf8adf795..6ea213bec 100755
--- a/src/op_mode/conntrack.py
+++ b/src/op_mode/conntrack.py
@@ -112,7 +112,8 @@ def get_formatted_output(dict_data):
proto = meta['layer4']['protoname']
if direction == 'independent':
conn_id = meta['id']
- timeout = meta['timeout']
+ # T6138 flowtable offload conntrack entries without 'timeout'
+ timeout = meta.get('timeout', 'n/a')
orig_src = f'{orig_src}:{orig_sport}' if orig_sport else orig_src
orig_dst = f'{orig_dst}:{orig_dport}' if orig_dport else orig_dst
reply_src = f'{reply_src}:{reply_sport}' if reply_sport else reply_src