diff options
author | Fredrik Gustafsson <[email protected]> | 2012-08-27 10:20:36 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-08-27 10:20:36 +0200 |
commit | 618e0f37c9dda5bc26900692ed0cc41031be9e76 (patch) | |
tree | adad7379350ddf7bfd782d72c4b95c38ee6fc7d5 /erts/preloaded | |
parent | ae2c50f36806b26530de88d2609cd6ced018cb54 (diff) | |
parent | 87570500f821c4aaeafa18705b3a4a479f5d9baa (diff) | |
download | otp-618e0f37c9dda5bc26900692ed0cc41031be9e76.tar.gz otp-618e0f37c9dda5bc26900692ed0cc41031be9e76.tar.bz2 otp-618e0f37c9dda5bc26900692ed0cc41031be9e76.zip |
Merge branch 'tab/fix-sctp-multihoming-IPv6/OTP-10217' into maint
* tab/fix-sctp-multihoming-IPv6/OTP-10217:
Allow mixed IPv4 and IPv6 addresses to sctp_bindx
Add checks for in6addr_any and in6addr_loopback
Fix SCTP multihoming
inet_drv.c: Set sockaddr lengths in inet_set_[f]address
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/prim_inet.beam | bin | 70100 -> 69952 bytes | |||
-rw-r--r-- | erts/preloaded/src/prim_inet.erl | 6 |
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam Binary files differindex b2f3ab6c5b..ad49f5e892 100644 --- a/erts/preloaded/ebin/prim_inet.beam +++ b/erts/preloaded/ebin/prim_inet.beam diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl index 846ae97ed2..91fcd3ac82 100644 --- a/erts/preloaded/src/prim_inet.erl +++ b/erts/preloaded/src/prim_inet.erl @@ -184,7 +184,7 @@ close_pend_loop(S, N) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bind(S,IP,Port) when is_port(S), is_integer(Port), Port >= 0, Port =< 65535 -> - case ctl_cmd(S,?INET_REQ_BIND,[?int16(Port),ip_to_bytes(IP)]) of + case ctl_cmd(S,?INET_REQ_BIND,enc_value(set, addr, {IP,Port})) of {ok, [P1,P0]} -> {ok, ?u16(P1, P0)}; {error,_}=Error -> Error end; @@ -206,10 +206,10 @@ bindx(S, AddFlag, Addrs) -> case getprotocol(S) of sctp -> %% Really multi-homed "bindx". Stringified args: - %% [AddFlag, (Port, IP)+]: + %% [AddFlag, (AddrBytes see enc_value_2(addr,X))+]: Args = [?int8(AddFlag)| - [[?int16(Port)|ip_to_bytes(IP)] || + [enc_value(set, addr, {IP,Port}) || {IP, Port} <- Addrs]], case ctl_cmd(S, ?SCTP_REQ_BINDX, Args) of {ok,_} -> {ok, S}; |