summaryrefslogtreecommitdiff
path: root/src/op_mode/show_ipsec_sa.py
diff options
context:
space:
mode:
authorjack9603301 <jack9603301@163.com>2021-03-25 15:10:27 +0800
committerjack9603301 <jack9603301@163.com>2021-03-27 14:03:35 +0800
commit9db9c3c51e05dae69e6c1b408215ae9433bc7489 (patch)
tree7939de740abb0ee1cdfbfaffe9c1800b6b188935 /src/op_mode/show_ipsec_sa.py
parent769f07e6ad93e369dafd9f417b957cdf163b0bfb (diff)
downloadvyos-1x-9db9c3c51e05dae69e6c1b408215ae9433bc7489.tar.gz
vyos-1x-9db9c3c51e05dae69e6c1b408215ae9433bc7489.zip
op-mode: ipsec: T3055: Fixed parsing peer name error
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 b7927fcc2..066e36b5e 100755
--- a/src/op_mode/show_ipsec_sa.py
+++ b/src/op_mode/show_ipsec_sa.py
@@ -70,6 +70,7 @@ for sa in sas:
else:
for csa in installed_sas:
isa = installed_sas[csa]
+ csa_name = isa['name']
bytes_in = hurry.filesize.size(int(isa["bytes-in"].decode()))
bytes_out = hurry.filesize.size(int(isa["bytes-out"].decode()))
@@ -103,7 +104,7 @@ for sa in sas:
if dh_group:
proposal = "{0}/{1}".format(proposal, dh_group)
- data = [peer, state, uptime, bytes_str, pkts_str, remote_host, remote_id, proposal]
+ data = [csa_name, state, uptime, bytes_str, pkts_str, remote_host, remote_id, proposal]
sa_data.append(data)
headers = ["Connection", "State", "Uptime", "Bytes In/Out", "Packets In/Out", "Remote address", "Remote ID", "Proposal"]