Age | Commit message (Collapse) | Author |
|
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!
|
|
* hb/kernel/opaque_decls/OTP-9337:
Modify two opaque types
|
|
Two opaque types that could cause warnings when running Dialyzer have
been modified.
|
|
* ia/ssl/ets-table-cleanup:
Corrected last argument to timer:apply_after also corrected a dilyzer spec
|
|
* ks/erl_bif_types-fixes:
Fix crash when a contract range warning is emitted for a module already in plt
Fix erroneous definition of t_binary_compiled_pattern()
|
|
|
|
* hb/stdlib/spec_fix/OTP-9333:
Fix a spec and a type
|
|
Warnings about wrong contract ranges are post-processed to be displayed in the
file/line that contains the contract, although they can also be emitted while
processing other modules. For this relocation to succeed the module that
contains the contract should be currently under analysis. If this is not the
case the warning is displayed in the file/line of the call that proves the
discrepancy in the contract.
|
|
While at it:
1. Moved types in their proper place
2. Did minor cleanups and
3. Took out an unused function
|
|
A specification that could cause problems for Dialyzer has been fixed.
An opaque type in erl_eval has been turned in to a ordinary type. This
is a temporary fix.
|
|
|
|
|
|
|
|
* kenneth/asn1/longlength/OTP-9303:
Fixed DRIVER_INIT prototype
Corrected handling of long length in driver and updated test suites
|
|
|
|
* nick/orber/dialyzer_warnings/OTP-9326:
OTP-9326 Eliminated Dialyzer warnings.
|
|
* nick/Cos-Apps/remove_shy_in_doc/OTP-9319:
OTP-9319 Removed superfluous usage of shy in the documentation since it can cause problem if a buggy tool is used.
|
|
* anders/diameter/20110519/doc/OTP-9323:
Remove undocumented interface functions plus comment fix.
Various documentation fixes and improvements.
Minor diameter_service fix when sending a diameter_header/avp list
Minor make depend fixes.
Trivial depend.sed simplification.
Fix broken doc links.
Fix broken make dependencies by generating them.
|
|
* rickard/driver_async_cancel/OTP-9302:
Fix testcase
|
|
|
|
|
|
Added an introductory chapter to the User's Guide as well as more
detailed release notes.
|
|
plus an example fix.
|
|
|
|
* dgud/wx/app-file/OTP-9324:
Fix wx app file, sed didn't work on all platforms
|
|
* sverker/crypto-aes-ctr-stream/OTP-9275:
Stepping vsn for R14B03
Add true streaming AES (CTR) encryption and streaming HMAC operations
|
|
|
|
* pan/stdlib_doc_fixes/OTP-9318:
Fixup of re doc and specs
|
|
* pan/epmd_testcase/OTP-9214:
Make ssh proxy work with older versions of ssh
Mend epmd testcases that test remote access
|
|
* pan/win_testcases_R14B03:
Fix bug in make_del_dir testcases
Teach (prim_)file_SUITE about directory access on Windows
OTP-9325
|
|
|
|
* nick/ssh-test-suite:
Removed unused record and fixed a few failing test cases,
Generic key management for test suites.
Some minor updates regarding how test data is generated.
Fixed host handling in ssh_test_lib (daemon and connect functions).
Fixed include problem.
Corrected include path and spelling of a test case function.
Resolved merge conflict.
Resolved merge issue.
Added code for generating certificates.
Altering SSH test keys.
Add test suite for ssh
Update init_per_suite so that tests are skipped if crypto/ssh cannot be started.
Add cover spec file
Convert ssh test cases to common test stardard
Add test suite for ssh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Eliminated Dialyzer warnings.
|
|
|