From 50f4916fce668186c270550053978e13cb700f8a Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 29 Aug 2020 01:56:38 +0200 Subject: Wireguard: Don't fix listen_port update --- proto/wireguard/wireguard.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proto/wireguard/wireguard.c b/proto/wireguard/wireguard.c index 6ac235f7..1837dc9c 100644 --- a/proto/wireguard/wireguard.c +++ b/proto/wireguard/wireguard.c @@ -44,8 +44,10 @@ int get_device(struct wg_proto *p, wg_device **pdev, const char *device_name) wg_generate_public_key(dev->public_key, dev->private_key); } if (c->listen_port) - dev->flags |= WGDEVICE_HAS_LISTEN_PORT; - dev->listen_port = c->listen_port; + { + dev->flags |= WGDEVICE_HAS_LISTEN_PORT; + dev->listen_port = c->listen_port; + } DBG("listen port %d\n", c->listen_port); struct peer_config *pc = NULL; -- cgit v1.2.3