diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-06-18 06:04:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 06:04:55 +0200 |
commit | 5f4ed4033195b1c92af0899c549c2bc20a5f5ea7 (patch) | |
tree | ec9d469d051f1640498863f96271429770a70ccb /src/op_mode | |
parent | c9dbc42bab13d70d22ca55794e4b89cac53adc86 (diff) | |
parent | 43d3c3b3d510d764c5ea21858451e391596e98b7 (diff) | |
download | vyos-1x-5f4ed4033195b1c92af0899c549c2bc20a5f5ea7.tar.gz vyos-1x-5f4ed4033195b1c92af0899c549c2bc20a5f5ea7.zip |
Merge pull request #884 from sarthurdev/opmode_ike_sa
ipsec: T2816: Fix 'show vpn ike sa' when key-size is not set
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/vpn_ike_sa.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/op_mode/vpn_ike_sa.py b/src/op_mode/vpn_ike_sa.py index fe016da45..2a3fbf718 100755 --- a/src/op_mode/vpn_ike_sa.py +++ b/src/op_mode/vpn_ike_sa.py @@ -49,7 +49,9 @@ def ike_sa(peer, nat): print('%-39s %-39s' % (remote_str, local_str)) state = 'up' if 'state' in sa and s(sa['state']) == 'ESTABLISHED' else 'down' version = 'IKEv' + s(sa['version']) - encryption = f'{s(sa["encr-alg"])}_{s(sa["encr-keysize"])}' if 'encr-alg' in sa else 'n/a' + encryption = f'{s(sa["encr-alg"])}' if 'encr-alg' in sa else 'n/a' + if 'encr-keysize' in sa: + encyption += '_' + s(sa["encr-keysize"]) integrity = s(sa['integ-alg']) if 'integ-alg' in sa else 'n/a' dh_group = s(sa['dh-group']) if 'dh-group' in sa else 'n/a' natt = 'yes' if 'nat-local' in sa and s(sa['nat-local']) == 'yes' else 'no' |