[erlang-questions] inet_res:getbyname/2 and udp:connect/3

Per Hedeland <>
Sun Jun 20 22:16:12 CEST 2010

Per Hedeland <> wrote:
> I.e. it
>seems this is actually a problem with the FreeBSD "port" build of
>Erlang/OTP (I happened to have such a build of R12B-5 around too - same
>problem there).

Actually this wasn't quite correct - it's a problem with the FreeBSD
port build only insofar as it uses --enable-sctp (which my other build
didn't) - thereby exposing a bug in inet_drv. I.e. connected UDP (and
handling of any other errors in UDP recv()) is broken in passive mode
for all SCTP-enabled builds. Patch below against R13B04 - R14A has the
same bug.


--- otp_src_R13B04/erts/emulator/drivers/common/inet_drv.c.ORIG	2010-02-19 19:03:43.000000000 +0100
+++ otp_src_R13B04/erts/emulator/drivers/common/inet_drv.c	2010-06-20 21:57:12.000000000 +0200
@@ -9382,9 +9382,8 @@
 		    if (short_recv)
 			async_error_am(desc, am_short_recv);
-			async_error(desc, err);
+			async_error(desc, err);

More information about the erlang-questions mailing list