summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-11-04 18:30:32 +0100
committerChristian Poessinger <christian@poessinger.com>2019-11-04 18:31:01 +0100
commit1964144258b3bfd0bf2afac07fef26d535b95eba (patch)
treedd5fae0de606c661f74e9bfea4734353b7b8a4aa /python
parent99c762ebbbb30a638760627bc6d5fd86932951e1 (diff)
downloadvyos-1x-1964144258b3bfd0bf2afac07fef26d535b95eba.tar.gz
vyos-1x-1964144258b3bfd0bf2afac07fef26d535b95eba.zip
list_interfaces: add wifi interfaces to bridgeable interfaces
Diffstat (limited to 'python')
-rw-r--r--python/vyos/interfaces.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/interfaces.py b/python/vyos/interfaces.py
index ecf061d17..37c093aca 100644
--- a/python/vyos/interfaces.py
+++ b/python/vyos/interfaces.py
@@ -59,7 +59,7 @@ def wireguard_dump():
"""Dump wireguard data in a python friendly way."""
last_device=None
output = {}
-
+
# Dump wireguard connection data
_f = subprocess.check_output(["wg", "show", "all", "dump"]).decode()
for line in _f.split('\n'):
@@ -72,14 +72,14 @@ def wireguard_dump():
# We are currently entering a new node
device, private_key, public_key, listen_port, fw_mark = items
last_device = device
-
+
output[device] = {
'private_key': None if private_key == '(none)' else private_key,
'public_key': None if public_key == '(none)' else public_key,
'listen_port': int(listen_port),
'fw_mark': None if fw_mark == 'off' else int(fw_mark),
'peers': {},
- }
+ }
else:
# We are entering a peer
device, public_key, preshared_key, endpoint, allowed_ips, latest_handshake, transfer_rx, transfer_tx, persistent_keepalive = items
@@ -95,5 +95,5 @@ def wireguard_dump():
'transfer_rx': int(transfer_rx),
'transfer_tx': int(transfer_tx),
'persistent_keepalive': None if persistent_keepalive == 'off' else int(persistent_keepalive),
- }
+ }
return output