diff options
author | Micael Karlberg <[email protected]> | 2018-07-23 17:36:16 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 14:50:18 +0200 |
commit | 4d14b84183c3c17f0ec03bf3631f1fd8575f07b9 (patch) | |
tree | 2d211c6ee879de4427f19dc59fe2b39828574c4c /erts/preloaded | |
parent | c077834b1465a8285f0c18e1d164c812aaadac9c (diff) | |
download | otp-4d14b84183c3c17f0ec03bf3631f1fd8575f07b9.tar.gz otp-4d14b84183c3c17f0ec03bf3631f1fd8575f07b9.tar.bz2 otp-4d14b84183c3c17f0ec03bf3631f1fd8575f07b9.zip |
[socket-nif] Add support for socket (level ipv6) option multicast_loop
Added support for the IPv6 socket option MULTICAST_LOOP.
OTP-14831.
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/socket.beam | bin | 56912 -> 56980 bytes | |||
-rw-r--r-- | erts/preloaded/src/socket.erl | 9 |
2 files changed, 6 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/socket.beam b/erts/preloaded/ebin/socket.beam Binary files differindex f5652bff1e..5decdd72c2 100644 --- a/erts/preloaded/ebin/socket.beam +++ b/erts/preloaded/ebin/socket.beam diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index 02232ebd68..7f160207b1 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -651,7 +651,7 @@ -define(SOCKET_OPT_IPV6_MTU_DISCOVER, 18). -define(SOCKET_OPT_IPV6_MULTICAST_HOPS, 19). -define(SOCKET_OPT_IPV6_MULTICAST_IF, 20). -%% -define(SOCKET_OPT_IPV6_MULTICAST_LOOP, 21). +-define(SOCKET_OPT_IPV6_MULTICAST_LOOP, 21). %% -define(SOCKET_OPT_IPV6_PORTRANGE, 22). %% -define(SOCKET_OPT_IPV6_PKTINFO, 23). %% -define(SOCKET_OPT_IPV6_PKTOPTIONS, 24). @@ -2277,6 +2277,9 @@ enc_setopt_value(ipv6, multicast_hops, V, _D, _T, _P) enc_setopt_value(ipv6, multicast_if, V, _D, _T, _P) when is_integer(V) -> V; +enc_setopt_value(ipv6, multicast_loop, V, _D, _T, _P) + when is_boolean(V) -> + V; enc_setopt_value(ipv6, v6only, V, _D, _T, _P) when is_boolean(V) -> V; enc_setopt_value(ipv6 = L, Opt, V, _D, _T, _P) -> @@ -2706,8 +2709,8 @@ enc_sockopt_key(ipv6 = _L, multicast_hops = _Opt, _Dir, _D, _T, _P) -> enc_sockopt_key(ipv6 = _L, multicast_if = _Opt, _Dir, _D, T, _P) when (T =:= dgram) orelse (T =:= raw) -> ?SOCKET_OPT_IPV6_MULTICAST_IF; -enc_sockopt_key(ipv6 = L, multicast_loop = Opt, _Dir, _D, _T, _P) -> - not_supported({L, Opt}); +enc_sockopt_key(ipv6 = _L, multicast_loop = _Opt, _Dir, _D, _T, _P) -> + ?SOCKET_OPT_IPV6_MULTICAST_LOOP; enc_sockopt_key(ipv6 = L, portrange = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); enc_sockopt_key(ipv6 = L, pktinfo = Opt, _Dir, _D, _T, _P) -> |