[erlang-questions] inet_res:getbyname/2 and udp:connect/3
Per Hedeland
per@REDACTED
Sun Jun 20 22:16:12 CEST 2010
Per Hedeland <per@REDACTED> 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.
--Per
--- 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);
else
-#else
- async_error(desc, err);
#endif
+ async_error(desc, err);
driver_cancel_timer(desc->port);
sock_select(desc,FD_READ,0);
}
More information about the erlang-questions
mailing list