From 875b45f7b010200de8836cd3773af3ad9fbee0fb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 22 Sep 2017 03:53:44 +0200 Subject: config: do not reset device port Signed-off-by: Jason A. Donenfeld --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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) -- cgit v1.2.3