diff options
author | Andy Pan <i@andypan.me> | 2024-05-20 18:36:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 12:36:41 +0200 |
commit | 10ccd084718f3a2e9e2776131405ee1d66cf1c29 (patch) | |
tree | 2bfbfcf92927494bdc75f1c574f0054fb916b3c8 /src | |
parent | bf61390769068de603e6deec8e16623efcbe761a (diff) | |
download | libuv-10ccd084718f3a2e9e2776131405ee1d66cf1c29.tar.gz libuv-10ccd084718f3a2e9e2776131405ee1d66cf1c29.zip |
dragonfly: disable SO_REUSEPORT for UDP socket bindings (#4410)
---------
Signed-off-by: Andy Pan <i@andypan.me>
Diffstat (limited to 'src')
-rw-r--r-- | src/unix/udp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/unix/udp.c b/src/unix/udp.c index ae09f3a7..e398509b 100644 --- a/src/unix/udp.c +++ b/src/unix/udp.c @@ -436,10 +436,10 @@ static void uv__udp_sendmsg(uv_udp_t* handle) { /* On the BSDs, SO_REUSEPORT implies SO_REUSEADDR but with some additional * refinements for programs that use multicast. * - * Linux as of 3.9 has a SO_REUSEPORT socket option but with semantics that - * are different from the BSDs: it _shares_ the port rather than steal it - * from the current listener. While useful, it's not something we can emulate - * on other platforms so we don't enable it. + * Linux as of 3.9 and DragonflyBSD 3.6 have the SO_REUSEPORT socket option but + * with semantics that are different from the BSDs: it _shares_ the port rather + * than steals it from the current listener. While useful, it's not something we + * can emulate on other platforms so we don't enable it. * * zOS does not support getsockname with SO_REUSEPORT option when using * AF_UNIX. @@ -461,7 +461,7 @@ static int uv__set_reuse(int fd) { return UV__ERR(errno); } #elif defined(SO_REUSEPORT) && !defined(__linux__) && !defined(__GNU__) && \ - !defined(__sun__) + !defined(__sun__) && !defined(__DragonFly__) if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes))) return UV__ERR(errno); #else |