summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2019-09-10 11:28:53 -0700
committerhagbard <vyosdev@derith.de>2019-09-10 11:28:53 -0700
commitdb07e6fa76d90eaf80a06729753fb89266437674 (patch)
tree03fc289e6a3ab71d11e80a0d625338f4d506c33a /src/conf_mode
parent1017c8103f12ebd6db4f250d8a154571fff32db1 (diff)
downloadvyos-1x-db07e6fa76d90eaf80a06729753fb89266437674.tar.gz
vyos-1x-db07e6fa76d90eaf80a06729753fb89266437674.zip
[wireguard]: T1650 - cli option to delete default wg key
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interface-wireguard.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/conf_mode/interface-wireguard.py b/src/conf_mode/interface-wireguard.py
index 0f9e66aa6..d51a7a08d 100755
--- a/src/conf_mode/interface-wireguard.py
+++ b/src/conf_mode/interface-wireguard.py
@@ -31,7 +31,6 @@ intfc = WireGuardIf(ifname)
kdir = r'/config/auth/wireguard'
-
def check_kmod():
if not os.path.exists('/sys/module/wireguard'):
sl.syslog(sl.LOG_NOTICE, "loading wirguard kmod")
@@ -55,7 +54,7 @@ def get_config():
'fwmark': 0x00,
'mtu': 1420,
'peer': {},
- 'pk': '{}/private.key'.format(kdir)
+ 'pk' : '{}/default/private.key'.format(kdir)
}
}
@@ -81,8 +80,7 @@ def get_config():
if c.exists(ifname + ' mtu'):
config_data[ifname]['mtu'] = c.return_value(ifname + ' mtu')
if c.exists(ifname + ' private-key'):
- config_data[ifname]['pk'] = "{0}/{1}/private.key".format(
- kdir, c.return_value(ifname + ' private-key'))
+ config_data[ifname]['pk'] = "{0}/{1}/private.key".format(kdir,c.return_value(ifname + ' private-key'))
if c.exists(ifname + ' peer'):
for p in c.list_nodes(ifname + ' peer'):
if not c.exists(ifname + ' peer ' + p + ' disable'):
@@ -113,7 +111,6 @@ def get_config():
return config_data
-
def verify(c):
if not c:
return None