summaryrefslogtreecommitdiff
path: root/src/op_mode/show_ipsec_sa.py
diff options
context:
space:
mode:
authorzdc <zdc@users.noreply.github.com>2021-11-01 17:04:11 +0200
committerGitHub <noreply@github.com>2021-11-01 17:04:11 +0200
commit1b7c879b9fed2f4563477039bc6ddf4dc0db5829 (patch)
treea0ea609a933a4d2e54d5712e2b1671a19181c372 /src/op_mode/show_ipsec_sa.py
parent3fd2ff423b6c6e992b2ed531c7ba99fb9e1a2123 (diff)
parent85bf315f71b411e3cdcd19793c4f7e1e5efed917 (diff)
downloadvyos-1x-1b7c879b9fed2f4563477039bc6ddf4dc0db5829.tar.gz
vyos-1x-1b7c879b9fed2f4563477039bc6ddf4dc0db5829.zip
Merge branch 'current' into T3350-sagitta
Diffstat (limited to 'src/op_mode/show_ipsec_sa.py')
-rwxr-xr-xsrc/op_mode/show_ipsec_sa.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/show_ipsec_sa.py b/src/op_mode/show_ipsec_sa.py
index c964caaeb..e72f0f965 100755
--- a/src/op_mode/show_ipsec_sa.py
+++ b/src/op_mode/show_ipsec_sa.py
@@ -46,7 +46,6 @@ def format_output(conns, sas):
if parent_sa["state"] == b"ESTABLISHED" and installed_sas:
state = "up"
- uptime = vyos.util.seconds_to_human(parent_sa["established"].decode())
remote_host = parent_sa["remote-host"].decode()
remote_id = parent_sa["remote-id"].decode()
@@ -75,6 +74,8 @@ def format_output(conns, sas):
# Remove B from <1K values
pkts_str = re.sub(r'B', r'', pkts_str)
+ uptime = vyos.util.seconds_to_human(isa['install-time'].decode())
+
enc = isa["encr-alg"].decode()
if "encr-keysize" in isa:
key_size = isa["encr-keysize"].decode()