aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_socket.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-08-23 15:04:32 +0200
committerIngela Anderton Andin <[email protected]>2017-08-24 10:10:49 +0200
commit56f6f1829e1f3fd3752914b302276bc9bf490bbb (patch)
treec91bd1f5814e5222684544075eb227b6fd92c0c8 /lib/ssl/src/dtls_socket.erl
parent22d4d46daa50b2f04b2219940dbf523d59928af6 (diff)
downloadotp-56f6f1829e1f3fd3752914b302276bc9bf490bbb.tar.gz
otp-56f6f1829e1f3fd3752914b302276bc9bf490bbb.tar.bz2
otp-56f6f1829e1f3fd3752914b302276bc9bf490bbb.zip
ssl: DTLS packet support
Test that DTLS handles "high" level packet types as http-packet types. Low level packet type as {packet, 2} we will consider later if they should be relevant to support or not.
Diffstat (limited to 'lib/ssl/src/dtls_socket.erl')
-rw-r--r--lib/ssl/src/dtls_socket.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_socket.erl b/lib/ssl/src/dtls_socket.erl
index fbbd479428..5f854fbb4b 100644
--- a/lib/ssl/src/dtls_socket.erl
+++ b/lib/ssl/src/dtls_socket.erl
@@ -137,7 +137,7 @@ internal_inet_values() ->
[{active, false}, {mode,binary}].
default_inet_values() ->
- [{active, true}, {mode, list}].
+ [{active, true}, {mode, list}, {packet, 0}, {packet_size, 0}].
default_cb_info() ->
{gen_udp, udp, udp_closed, udp_error}.
@@ -149,8 +149,12 @@ get_emulated_opts(EmOpts, EmOptNames) ->
emulated_socket_options(InetValues, #socket_options{
mode = Mode,
+ packet = Packet,
+ packet_size = PacketSize,
active = Active}) ->
#socket_options{
mode = proplists:get_value(mode, InetValues, Mode),
+ packet = proplists:get_value(packet, InetValues, Packet),
+ packet_size = proplists:get_value(packet_size, InetValues, PacketSize),
active = proplists:get_value(active, InetValues, Active)
}.