|
|
| Author |
Message |
< Erlang patches mailing list ~ [erlang-questions] inet_res:getbyname/2 and udp:connect/3 |
| Guest |
Posted: Sun Jun 20, 2010 8:20 pm |
|
|
|
Guest
|
Per Hedeland <per@hedeland.org> 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);
}
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Sun Jun 20, 2010 8:20 pm |
|
|
|
Guest
|
Per Hedeland <per@hedeland.org> 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);
}
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Jun 21, 2010 1:43 pm |
|
|
|
Guest
|
On Sun, Jun 20, 2010 at 10:16:12PM +0200, Per Hedeland wrote:
> Per Hedeland <per@hedeland.org> 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@erlang.org
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Jun 21, 2010 1:44 pm |
|
|
|
Guest
|
On Sun, Jun 20, 2010 at 10:16:12PM +0200, Per Hedeland wrote:
> Per Hedeland <per@hedeland.org> 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@erlang.org
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|