Skip to content

Commit

Permalink
Merge pull request #2894 from vyos/mergify/bp/current/pr-2619
Browse files Browse the repository at this point in the history
T5817: Fix for show openvpn server (backport #2619)
  • Loading branch information
dmbaturin authored Jan 25, 2024
2 parents 80d6813 + c13628b commit ee19ebb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/op_mode/show_openvpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ def get_vpn_tunnel_address(peer, interface):
# filter out subnet entries
lst = [l for l in lst[1:] if '/' not in l.split(',')[0]]

tunnel_ip = lst[0].split(',')[0]
if lst:
tunnel_ip = lst[0].split(',')[0]
return tunnel_ip

return tunnel_ip
return 'n/a'

def get_status(mode, interface):
status_file = '/var/run/openvpn/{}.status'.format(interface)
Expand Down

0 comments on commit ee19ebb

Please sign in to comment.