summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2018-08-26 11:27:54 -0700
committerhagbard <vyosdev@derith.de>2018-08-26 11:27:54 -0700
commitcc584bb5ae8e701b0d8471fa675a0e44228b4ee2 (patch)
tree07fec71e2c1b68ee34b779d2d20f6e588b67b920 /src
parentf2aaa21fb909933246f3340240dc17d05c5f9695 (diff)
downloadvyos-1x-cc584bb5ae8e701b0d8471fa675a0e44228b4ee2.tar.gz
vyos-1x-cc584bb5ae8e701b0d8471fa675a0e44228b4ee2.zip
T427: changed option listen-port to only port
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/wireguard.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conf_mode/wireguard.py b/src/conf_mode/wireguard.py
index 0324e12a2..9848914e3 100755
--- a/src/conf_mode/wireguard.py
+++ b/src/conf_mode/wireguard.py
@@ -89,8 +89,8 @@ def get_config():
if c.exists(cnf + ' address'):
config_data['interfaces'][intfc]['addr'] = c.return_values(cnf + ' address')
### listen port
- if c.exists(cnf + ' listen-port'):
- config_data['interfaces'][intfc]['lport'] = c.return_value(cnf + ' listen-port')
+ if c.exists(cnf + ' port'):
+ config_data['interfaces'][intfc]['lport'] = c.return_value(cnf + ' port')
### description
if c.exists(cnf + ' description'):
config_data['interfaces'][intfc]['descr'] = c.return_value(cnf + ' description')
@@ -227,7 +227,7 @@ def apply(c):
def configure_interface(c, intf):
wg_config = {
'interface' : intf,
- 'listen-port' : 0,
+ 'port' : 0,
'private-key' : '/config/auth/wireguard/private.key',
'peer' :
{
@@ -248,7 +248,7 @@ def configure_interface(c, intf):
## optional settings
# listen-port
if c['interfaces'][intf]['lport']:
- wg_config['listen-port'] = c['interfaces'][intf]['lport']
+ wg_config['port'] = c['interfaces'][intf]['lport']
## endpoint
if c['interfaces'][intf]['peer'][p]['endpoint']:
@@ -260,7 +260,7 @@ def configure_interface(c, intf):
### assemble wg command
cmd = "sudo wg set " + intf
- cmd += " listen-port " + str(wg_config['listen-port'])
+ cmd += " listen-port " + str(wg_config['port'])
cmd += " private-key " + wg_config['private-key']
cmd += " peer " + wg_config['peer']['pubkey']
cmd += " allowed-ips "