summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index b5d0799..af7d049 100644
--- a/src/config.c
+++ b/src/config.c
@@ -12,6 +12,8 @@
static int set_device_port(struct wireguard_device *wg, u16 port)
{
struct wireguard_peer *peer, *temp;
+ if (wg->incoming_port == port)
+ return 0;
socket_uninit(wg);
wg->incoming_port = port;
peer_for_each (wg, peer, temp, false)