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

Raimo Niskanen raimo+erlang-patches@REDACTED
Mon Jun 21 15:31:40 CEST 2010


On Sun, Jun 20, 2010 at 10:16:12PM +0200, Per Hedeland wrote:
> 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.

Thank you! Well done.

http://github.com/RaimoNiskanen/otp/commit/5615d7ac85e94ec718a2acdc9e77381f9109a64c

git fetch git://github.com/RaimoNiskanen/otp.git rani/sctp-udp-recv-error

Will be included in 'pu'.


> 
> --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);
>  		}
> 
> ________________________________________________________________
> erlang-patches (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list