diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-07-25 12:20:36 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-07-25 12:20:36 +0000 |
commit | 870fe6c828a8c7b86899a1c580414d1491eeb8b0 (patch) | |
tree | 7326162ca637e3b764f21fbe340663e5be2486a1 /src/op_mode | |
parent | 3337aedd5f7ff48bfad051d760023a188fdace70 (diff) | |
download | vyos-1x-870fe6c828a8c7b86899a1c580414d1491eeb8b0.tar.gz vyos-1x-870fe6c828a8c7b86899a1c580414d1491eeb8b0.zip |
ipsec: T4568: Fix debug IPsec peer
Debug Connections for a peer wasn't checked because of typo
in var `conns`
Replace ':' to '-' for IPv6 peers
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/vpn_ipsec.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/op_mode/vpn_ipsec.py b/src/op_mode/vpn_ipsec.py index 8955e5a59..68dc5bc45 100755 --- a/src/op_mode/vpn_ipsec.py +++ b/src/op_mode/vpn_ipsec.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021 VyOS maintainers and contributors +# Copyright (C) 2021-2022 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -87,6 +87,7 @@ def reset_profile(profile, tunnel): print('Profile reset result: ' + ('success' if result == 0 else 'failed')) def debug_peer(peer, tunnel): + peer = peer.replace(':', '-') if not peer or peer == "all": debug_commands = [ "sudo ipsec statusall", @@ -109,7 +110,7 @@ def debug_peer(peer, tunnel): if not tunnel or tunnel == 'all': tunnel = '' - conn = get_peer_connections(peer, tunnel) + conns = get_peer_connections(peer, tunnel, return_all = (tunnel == '' or tunnel == 'all')) if not conns: print('Peer not found, aborting') |