summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-10-28 23:21:03 +0700
committerGitHub <noreply@github.com>2021-10-28 23:21:03 +0700
commitdf02d40fe93cd1ca9f7248a30ccc2f78c0527a44 (patch)
tree994f620a3049b73915cf084ca79e16fe24735055
parent2c82c9acbde2ccca9c7bb5e646a45fd646463afe (diff)
parent494f1f3473d07947e3e03ce410ac0690eaeb9ed9 (diff)
downloadvyos-1x-df02d40fe93cd1ca9f7248a30ccc2f78c0527a44.tar.gz
vyos-1x-df02d40fe93cd1ca9f7248a30ccc2f78c0527a44.zip
Merge pull request #1049 from sever-sever/T3941
IPSec: T3941: Fix uptime for tunnels sa op-mode
-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()