Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-11-18 | gen_udp_SUITE:buffer_size test case fix | Raimo Niskanen | |
2011-08-27 | Fix type of Packet arg of gen_tcp:send/2 and gen_udp:send/4 | Filipe David Manana | |
The type is marked as a binary() or a string() but in practice it can be an iodata(). The test suite was updated to confirm the gen_tcp/2 and gen_udp:send/4 functions accept iodata() (iolists) packets. | |||
2011-05-24 | inet: error if fd does not match socket domain | Michael Santos | |
If an IPv4 fd is opened as an IPv6 socket, unexpected behaviour can occur. For example, if an IPv4 UDP socket is opened and passed into Erlang as an IPv6 socket, the first 3 bytes (corresponding to 1 byte representing the protocol family, 2 bytes set to the port) are stripped from the payload. The cause of the UDP payload truncation happens in inet_drv.c:packet_inet_input when a call to inet_get_address fails silently because the family is set to PF_INET6 but the buffer len is the size of an IPv4 struct sockaddr_in. Prevent this behaviour by checking that the protocol family of the file descriptor matches the family of the requested Erlang socket. {ok, S1} = gen_udp:open(0, [binary, inet]), {ok, FD} = inet:getfd(S1), {ok, Port} = inet:port(S1), {ok, S} = gen_udp:open(Port, [binary, {fd, FD}, inet6]), {ok, C} = gen_udp:open(0, [binary]), Msg = <<1,2,3,4,5>>, gen_udp:send(C, "127.0.0.1", Port, Msg), receive {udp, S, _, _, Msg} -> ok; {udp, S, _, _, NewMsg} -> {error, Msg, NewMsg} end. This test results in: {error,<<1,2,3,4,5>>,<<4,5>>} Thanks to Andrew Tunnell-Jones for finding the bug and the test case! | |||
2011-03-11 | Update copyright years | Björn-Egil Dahlberg | |
2011-03-07 | Merge branch 'raimo/kernel-implicit_inet6-testcase' into dev | Raimo Niskanen | |
* raimo/kernel-implicit_inet6-testcase: Improve implicit_inet6 testcase skip conditions | |||
2011-02-17 | Rename Suite Callback to Common Test Hook | Lukas Larsson | |
2011-02-17 | Fix formatting for kernel | Lukas Larsson | |
2011-02-17 | Add init_per_suite and end_per_suite | Lukas Larsson | |
2011-02-17 | Add ts_install_scb to suite/0 | Lukas Larsson | |
2011-02-17 | Update kernel tests to conform with common_test standard | Lukas Larsson | |
2011-02-17 | Update all fin_per_testcase to end_per_testcase. | Lukas Larsson | |
2010-12-07 | Improve implicit_inet6 testcase skip conditions | Raimo Niskanen | |
2010-09-21 | Teach gen_udp_SUITE:connect testcase about econnreset on Windows | Patrik Nyblom | |
2010-09-13 | Add line macros to gen_udp_SUITE:connect | Patrik Nyblom | |
2010-09-06 | Add tests | Raimo Niskanen | |
Conflicts: lib/kernel/test/gen_sctp_SUITE.erl | |||
2010-07-07 | Fix inet_drv to detect passive mode UDP errors for SCTP builds | Raimo Niskanen | |
Debug and patch by Per Hedeland for R13B04 on erlang-patches: Connected UDP (and handling of any other errors in UDP recv()) is broken in passive mode for all SCTP-enabled builds. | |||
2009-11-20 | The R13B03 release.OTP_R13B03 | Erlang/OTP | |