diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-22 03:53:44 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-24 23:10:15 +0200 |
commit | 875b45f7b010200de8836cd3773af3ad9fbee0fb (patch) | |
tree | e723274972a716fcd1179cdc128243ccc3feda8a /src/config.c | |
parent | 18e49c76cfe5efe9c10a5ed2f59f694c98c30390 (diff) |
config: do not reset device port
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 2 |
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) |