aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@noconroy.net>2020-05-23 01:55:58 +1000
committerMatt Dunwoodie <ncon@noconroy.net>2020-05-23 01:55:58 +1000
commit3c4d2ee7c2d34eaa816d83e8801bfe7c308e85fd (patch)
tree9d45de54be33115c889c15cfe57fc415697af2e6
parentRefactor binding interface. (diff)
downloadwireguard-openbsd-3c4d2ee7c2d34eaa816d83e8801bfe7c308e85fd.tar.xz
wireguard-openbsd-3c4d2ee7c2d34eaa816d83e8801bfe7c308e85fd.zip
Setting port 0 makes sense
That is, let the interface choose the port. wg(8) allows this, so supposedly we should too.
-rw-r--r--src/patches/ifconfig.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/patches/ifconfig.patch b/src/patches/ifconfig.patch
index 28e9e67..daa5776 100644
--- a/src/patches/ifconfig.patch
+++ b/src/patches/ifconfig.patch
@@ -256,7 +256,7 @@ index aefa23d157a..ee6d51aadb3 100644
+ const char *errmsg = NULL;
+ ensurewginterface();
+ wg_interface->i_flags |= WG_INTERFACE_HAS_PORT;
-+ wg_interface->i_port = strtonum(port, 1, 65535, &errmsg);
++ wg_interface->i_port = strtonum(port, 0, 65535, &errmsg);
+ if (errmsg)
+ errx(1, "wgport: %s, %s", port, errmsg);
+}