diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/completion/list_openvpn_clients.py | 31 | ||||
-rwxr-xr-x | src/xdp/utils/xdp_loader | bin | 683072 -> 0 bytes | |||
-rwxr-xr-x | src/xdp/utils/xdp_stats | bin | 687784 -> 0 bytes |
3 files changed, 17 insertions, 14 deletions
diff --git a/src/completion/list_openvpn_clients.py b/src/completion/list_openvpn_clients.py index 177ac90c9..b443520ea 100755 --- a/src/completion/list_openvpn_clients.py +++ b/src/completion/list_openvpn_clients.py @@ -22,20 +22,23 @@ from vyos.ifconfig import Section def get_client_from_interface(interface): clients = [] - with open('/opt/vyatta/etc/openvpn/status/' + interface + '.status', 'r') as f: - dump = False - for line in f: - if line.startswith("Common Name,"): - dump = True - continue - if line.startswith("ROUTING TABLE"): - dump = False - continue - if dump: - # client entry in this file looks like - # client1,172.18.202.10:47495,2957,2851,Sat Aug 17 00:07:11 2019 - # we are only interested in the client name 'client1' - clients.append(line.split(',')[0]) + try: + with open('/run/openvpn/' + interface + '.status', 'r') as f: + dump = False + for line in f: + if line.startswith("Common Name,"): + dump = True + continue + if line.startswith("ROUTING TABLE"): + dump = False + continue + if dump: + # client entry in this file looks like + # client1,172.18.202.10:47495,2957,2851,Sat Aug 17 00:07:11 2019 + # we are only interested in the client name 'client1' + clients.append(line.split(',')[0]) + except: + pass return clients diff --git a/src/xdp/utils/xdp_loader b/src/xdp/utils/xdp_loader Binary files differdeleted file mode 100755 index 887a7788b..000000000 --- a/src/xdp/utils/xdp_loader +++ /dev/null diff --git a/src/xdp/utils/xdp_stats b/src/xdp/utils/xdp_stats Binary files differdeleted file mode 100755 index fafb10cd1..000000000 --- a/src/xdp/utils/xdp_stats +++ /dev/null |