File 1504-erts-preloaded-Fix-option-reuseaddr-for-FreeBSD-14.patch of Package erlang
From e34b8beb5d9f4625f4080bfa3d12330404a75bbc Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Mon, 18 Dec 2023 14:25:26 +0100
Subject: [PATCH] [erts|preloaded] Fix option reuseaddr for FreeBSD 14
On FreeBSD 14 (at the moment) the socket option 'reuseaddr' is
not "inherited" (from the listen socket) by accepted socket.
So, attempt to "patch" this by adding 'reuseaddr' to the list
of options that are explicitly "copied" from the listen socket
to the accepted socket.
---
erts/preloaded/ebin/prim_inet.beam | Bin 102108 -> 102080 bytes
erts/preloaded/src/prim_inet.erl | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index a9264d551a..23bac25930 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -493,7 +493,7 @@ accept_opts(L, S, FamilyOpts) ->
case
getopts(
L,
- [active, nodelay, keepalive, delay_send, priority, linger]
+ [active, nodelay, keepalive, delay_send, priority, linger, reuseaddr]
++ FamilyOpts)
of
{ok, Opts} ->
--
2.35.3