aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-08-27 10:20:36 +0200
committerFredrik Gustafsson <[email protected]>2012-08-27 10:20:36 +0200
commit618e0f37c9dda5bc26900692ed0cc41031be9e76 (patch)
treeadad7379350ddf7bfd782d72c4b95c38ee6fc7d5 /erts/preloaded
parentae2c50f36806b26530de88d2609cd6ced018cb54 (diff)
parent87570500f821c4aaeafa18705b3a4a479f5d9baa (diff)
downloadotp-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.beambin70100 -> 69952 bytes
-rw-r--r--erts/preloaded/src/prim_inet.erl6
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index b2f3ab6c5b..ad49f5e892 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
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};