diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-08-29 01:56:38 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-09-13 18:05:34 +0200 |
commit | 227de2b4df37bb1a2e16e331add6c973b99457d0 (patch) | |
tree | 02f828b1993c29409dfbff36662974f88e4aee34 | |
parent | e49674a43bff2298fc236d40bb2bc622b38febbd (diff) |
Wireguard: Don't fix listen_port update
-rw-r--r-- | proto/wireguard/wireguard.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/wireguard/wireguard.c b/proto/wireguard/wireguard.c index 261bc789..4e7abe88 100644 --- a/proto/wireguard/wireguard.c +++ b/proto/wireguard/wireguard.c @@ -49,8 +49,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; |