summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2018-08-23 11:46:15 -0700
committerhagbard <vyosdev@derith.de>2018-08-23 11:46:15 -0700
commitdc7bd3227dfea462d1ecd7d285972a61b267cfae (patch)
tree554347a8b9916b616bc3950bce12aee65cb5c932
parent810906cf4c3e7ea8261b21a70ba5d5e71c4c7484 (diff)
downloadvyos-1x-dc7bd3227dfea462d1ecd7d285972a61b267cfae.tar.gz
vyos-1x-dc7bd3227dfea462d1ecd7d285972a61b267cfae.zip
listen-port for update mode needs to be 0 to switch back to randomly chosen if previously configured
-rwxr-xr-xsrc/conf_mode/wireguard.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/conf_mode/wireguard.py b/src/conf_mode/wireguard.py
index 1df7bcdf8..032a407ca 100755
--- a/src/conf_mode/wireguard.py
+++ b/src/conf_mode/wireguard.py
@@ -262,9 +262,7 @@ def configure_interface(c, intf):
### assemble wg command
cmd = "sudo wg set " + intf
- if wg_config['listen-port'] !=0:
- cmd += " listen-port " + str(wg_config['listen-port'])
-
+ cmd += " listen-port " + str(wg_config['listen-port'])
cmd += " private-key " + wg_config['private-key']
cmd += " peer " + wg_config['peer']['pubkey']
cmd += " allowed-ips "