Skip to content

pkg/tinydtls/contrib/sock_dtls: fix ep_to_session#17849

Merged
miri64 merged 1 commit intoRIOT-OS:masterfrom
leandrolanzieri:pr/pkg/tinydtls/fix_ep_to_session
Mar 25, 2022
Merged

pkg/tinydtls/contrib/sock_dtls: fix ep_to_session#17849
miri64 merged 1 commit intoRIOT-OS:masterfrom
leandrolanzieri:pr/pkg/tinydtls/fix_ep_to_session

Conversation

@leandrolanzieri
Copy link
Contributor

Contribution description

The size field in the session_t structure should reflect the size of the addr field for the particular OS. This was producing random errors when calculating the client_hello cookie, because the address is part of the hash, and the length used to update the sha256_update function was set to 18.

Testing procedure

  • dtls_sock application should work reliably.

Issues/PRs references

None

@leandrolanzieri leandrolanzieri added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Mar 23, 2022
@miri64
Copy link
Member

miri64 commented Mar 23, 2022

Niiice, will test if this takes care of the random handshake problems I had during my DoC evaluation once I am back from IETF (or if I find a quiet minute during IETF)!

@github-actions github-actions bot added the Area: pkg Area: External package ports label Mar 23, 2022
@kfessel kfessel added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: network Area: Networking labels Mar 23, 2022
@github-actions github-actions bot added Area: examples Area: Example Applications and removed Area: network Area: Networking labels Mar 23, 2022
@miri64
Copy link
Member

miri64 commented Mar 24, 2022

The size field in the session_t structure should reflect the size of the addr field for the particular OS.

Do you have some references for that? The only doc on that I found was for the POSIX-version where the port is included in addr.

I still have problems establishing a session over CoAPS from a RIOT client to an aiocoap server, due to the server not accepting the Finished from the client (which is also not properly decrypted in Wireshark). :-(

Maybe the proper fix could be, to change tinydtls so that the addr member is a ipv6_addr_t-uint16_t-struct?

In any case, I think session->size should be initialized by means of sizeof(session->addr) and not a static type, to prevent such confusions.

@miri64
Copy link
Member

miri64 commented Mar 24, 2022

Here is an excerpt from the log output of the aiocoap server, in case that helps:

Details
Mar 24 10:49:27 WARN unsupported tls extension: 23
Mar 24 10:49:27 WARN decryption failed
Mar 24 10:49:27 INFO decrypt_verify() failed
Mar 24 10:49:30 WARN unsupported tls extension: 23
Mar 24 10:49:30 ALRT No security context for epoch: 1
Mar 24 10:49:30 INFO decrypt_verify() failed
Mar 24 10:49:33 WARN unsupported tls extension: 23
Mar 24 10:49:35 ALRT No security context for epoch: 1
Mar 24 10:49:35 INFO decrypt_verify() failed
Mar 24 10:49:36 WARN unsupported tls extension: 23
Mar 24 10:49:36 WARN decryption failed
Mar 24 10:49:36 INFO decrypt_verify() failed
Mar 24 10:49:39 WARN unsupported tls extension: 23
Mar 24 10:49:39 INFO Duplicate packet arrived (cseq=2)
Mar 24 10:49:39 ALRT No security context for epoch: 1
Mar 24 10:49:39 INFO decrypt_verify() failed
Mar 24 10:49:42 WARN unsupported tls extension: 23
Mar 24 10:49:42 WARN decryption failed
Mar 24 10:49:42 INFO decrypt_verify() failed
Mar 24 10:49:45 WARN unsupported tls extension: 23
Mar 24 10:49:45 ALRT No security context for epoch: 1
Mar 24 10:49:45 INFO decrypt_verify() failed
Mar 24 10:49:48 WARN unsupported tls extension: 23
Mar 24 10:49:48 INFO Duplicate packet arrived (cseq=2)
Mar 24 10:49:48 ALRT No security context for epoch: 1
Mar 24 10:49:48 INFO decrypt_verify() failed
Mar 24 10:49:51 WARN unsupported tls extension: 23
Mar 24 10:49:51 WARN decryption failed
Mar 24 10:49:51 INFO decrypt_verify() failed
Mar 24 10:49:54 WARN unsupported tls extension: 23
Mar 24 10:49:54 WARN decryption failed
Mar 24 10:49:54 INFO decrypt_verify() failed
Mar 24 10:50:00 INFO ** Alert: level 1, description 0
Mar 24 10:50:00 WARN got an alert for an unknown peer, we probably already removed it, ignore it

and here is the sniffer_aggregator-generated PCAP from that run (PSK to configure in Wireshark is 73656372657450534b (or secretPSK in ASCII)

@leandrolanzieri
Copy link
Contributor Author

The size field in the session_t structure should reflect the size of the addr field for the particular OS.

Do you have some references for that? The only doc on that I found was for the POSIX-version where the port is included in addr.

The reason the handshake was failing in my case was because of an inconsistency in the cookie creation, because in these lines the hmac is updated with the address, and the size used was larger than the address. The two extra bytes messed the cookie creation randomly.

https://github.com/eclipse/tinydtls/blob/706888256c3e03d9fcf1ec37bb1dd6499213be3c/dtls.c#L338-L339

I still have problems establishing a session over CoAPS from a RIOT client to an aiocoap server, due to the server not accepting the Finished from the client (which is also not properly decrypted in Wireshark). :-(

Maybe the proper fix could be, to change tinydtls so that the addr member is a ipv6_addr_t-uint16_t-struct?

In any case, I think session->size should be initialized by means of sizeof(session->addr) and not a static type, to prevent such confusions.

Will change to this

@miri64
Copy link
Member

miri64 commented Mar 24, 2022

The reason the handshake was failing in my case was because of an inconsistency in the cookie creation, because in these lines the hmac is updated with the address, and the size used was larger than the address. The two extra bytes messed the cookie creation randomly.

https://github.com/eclipse/tinydtls/blob/706888256c3e03d9fcf1ec37bb1dd6499213be3c/dtls.c#L338-L339

To be clear, since the size member doc for POSIX says, it should be the size of addr (where the port is included), I suspect including the port member, might be right (otherwise you may only have one session with one service on a host [?]). However, this shouldn't be done as is, but by properly defining e.g.

#include <stdint.h>
#include "net/ipv6/addr.h"
typedef struct {
  unsigned char size;
  struct {
     ipv6_addr_t addr;
     uint16_t port;
  } addr;
  int ifindex;
} session_t;

in the session.h of TinyDTLS, and then using sizeof(session->addr) through-out the RIOT code.

@miri64
Copy link
Member

miri64 commented Mar 24, 2022

To be clear, since the size member doc for POSIX says, it should be the size of addr (where the port is included), I suspect including the port member, might be right (otherwise you may only have one session with one service on a host [?]).

Maybe @obgm can help here 😅

@miri64
Copy link
Member

miri64 commented Mar 24, 2022

The reason the handshake was failing in my case was because of an inconsistency in the cookie creation, because in these lines the hmac is updated with the address, and the size used was larger than the address. The two extra bytes messed the cookie creation randomly.

I think the cookie creation is not the problem I face, the server reports the cookie as valid, if I enable DEBUG there:

Details
Mar 24 11:14:51 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:14:51 DEBG got packet 22 (73 bytes)
Mar 24 11:14:51 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:14:51 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:14:51 DEBG cookie len is 0!
Mar 24 11:14:51 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:14:51 DEBG server hello verify was sent
Mar 24 11:14:51 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:14:51 DEBG got packet 22 (89 bytes)
Mar 24 11:14:51 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:14:51 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:14:51 DEBG found matching cookie
Mar 24 11:14:51 DEBG creating new peer
Mar 24 11:14:51 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:14:51 DEBG clear MAC
Mar 24 11:14:51 WARN unsupported tls extension: 23
Mar 24 11:14:51 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:14:51 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:14:51 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:51 DEBG got packet 22 (42 bytes)
Mar 24 11:14:51 DEBG new packet arrived with seq_nr: 2
Mar 24 11:14:51 DEBG new bitfield is               : 2
Mar 24 11:14:51 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:14:51 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:14:51 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:51 DEBG got packet 20 (14 bytes)
Mar 24 11:14:51 DEBG new packet arrived with seq_nr: 3
Mar 24 11:14:51 DEBG new bitfield is               : 5
Mar 24 11:14:51 DEBG key_block (40 bytes):
Mar 24 11:14:51 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:51 DEBG got packet 22 (53 bytes)
Mar 24 11:14:51 WARN decryption failed
Mar 24 11:14:51 INFO decrypt_verify() failed
Mar 24 11:14:54 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:14:54 DEBG got packet 22 (73 bytes)
Mar 24 11:14:54 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:14:54 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:14:54 DEBG cookie len is 0!
Mar 24 11:14:54 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:14:54 DEBG server hello verify was sent
Mar 24 11:14:54 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:14:54 DEBG got packet 22 (89 bytes)
Mar 24 11:14:54 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:14:54 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:14:54 DEBG found matching cookie
Mar 24 11:14:54 DEBG creating new peer
Mar 24 11:14:54 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:14:54 DEBG clear MAC
Mar 24 11:14:54 WARN unsupported tls extension: 23
Mar 24 11:14:54 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:14:54 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:14:54 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:54 DEBG got packet 22 (42 bytes)
Mar 24 11:14:54 DEBG new packet arrived with seq_nr: 2
Mar 24 11:14:54 DEBG new bitfield is               : 2
Mar 24 11:14:54 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:14:54 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:14:54 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:54 DEBG got packet 20 (14 bytes)
Mar 24 11:14:54 DEBG new packet arrived with seq_nr: 3
Mar 24 11:14:54 DEBG new bitfield is               : 5
Mar 24 11:14:54 DEBG key_block (40 bytes):
Mar 24 11:14:54 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:54 DEBG got packet 20 (14 bytes)
Mar 24 11:14:54 INFO Duplicate packet arrived (cseq=3)
Mar 24 11:14:57 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:57 DEBG got packet 21 (31 bytes)
Mar 24 11:14:57 WARN decryption failed
Mar 24 11:14:57 INFO decrypt_verify() failed
Mar 24 11:14:57 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:14:57 DEBG got packet 22 (73 bytes)
Mar 24 11:14:57 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:14:57 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:14:57 DEBG cookie len is 0!
Mar 24 11:14:57 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:14:57 DEBG server hello verify was sent
Mar 24 11:14:57 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:14:57 DEBG got packet 22 (89 bytes)
Mar 24 11:14:57 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:14:57 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:14:57 DEBG found matching cookie
Mar 24 11:14:57 DEBG creating new peer
Mar 24 11:14:57 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:14:57 DEBG clear MAC
Mar 24 11:14:57 WARN unsupported tls extension: 23
Mar 24 11:14:57 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:14:57 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:14:57 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:57 DEBG got packet 22 (42 bytes)
Mar 24 11:14:57 DEBG new packet arrived with seq_nr: 2
Mar 24 11:14:57 DEBG new bitfield is               : 2
Mar 24 11:14:57 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:14:57 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:14:57 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:57 DEBG got packet 20 (14 bytes)
Mar 24 11:14:57 DEBG new packet arrived with seq_nr: 3
Mar 24 11:14:57 DEBG new bitfield is               : 5
Mar 24 11:14:57 DEBG key_block (40 bytes):
Mar 24 11:14:57 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:14:57 DEBG got packet 22 (53 bytes)
Mar 24 11:14:57 WARN decryption failed
Mar 24 11:14:57 INFO decrypt_verify() failed
Mar 24 11:15:00 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:00 DEBG got packet 22 (73 bytes)
Mar 24 11:15:00 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:00 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:00 DEBG cookie len is 0!
Mar 24 11:15:00 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:00 DEBG server hello verify was sent
Mar 24 11:15:00 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:00 DEBG got packet 22 (89 bytes)
Mar 24 11:15:00 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:00 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:00 DEBG found matching cookie
Mar 24 11:15:00 DEBG creating new peer
Mar 24 11:15:00 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:00 DEBG clear MAC
Mar 24 11:15:00 WARN unsupported tls extension: 23
Mar 24 11:15:00 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:00 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:00 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:00 DEBG got packet 22 (42 bytes)
Mar 24 11:15:00 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:00 DEBG new bitfield is               : 2
Mar 24 11:15:00 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:00 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:00 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:00 DEBG got packet 22 (42 bytes)
Mar 24 11:15:00 INFO Duplicate packet arrived (cseq=2)
Mar 24 11:15:00 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:00 DEBG got packet 20 (14 bytes)
Mar 24 11:15:00 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:00 DEBG new bitfield is               : 5
Mar 24 11:15:00 DEBG key_block (40 bytes):
Mar 24 11:15:00 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:00 DEBG got packet 22 (53 bytes)
Mar 24 11:15:00 WARN decryption failed
Mar 24 11:15:00 INFO decrypt_verify() failed
Mar 24 11:15:03 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:03 DEBG got packet 22 (73 bytes)
Mar 24 11:15:03 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:03 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:03 DEBG cookie len is 0!
Mar 24 11:15:03 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:03 DEBG server hello verify was sent
Mar 24 11:15:03 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:03 DEBG got packet 22 (89 bytes)
Mar 24 11:15:03 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:03 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:03 DEBG found matching cookie
Mar 24 11:15:03 DEBG creating new peer
Mar 24 11:15:03 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:03 DEBG clear MAC
Mar 24 11:15:03 WARN unsupported tls extension: 23
Mar 24 11:15:03 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:03 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:03 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:03 DEBG got packet 22 (42 bytes)
Mar 24 11:15:03 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:03 DEBG new bitfield is               : 2
Mar 24 11:15:03 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:03 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:03 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:03 DEBG got packet 22 (53 bytes)
Mar 24 11:15:03 ALRT No security context for epoch: 1
Mar 24 11:15:03 INFO decrypt_verify() failed
Mar 24 11:15:06 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:06 DEBG got packet 22 (73 bytes)
Mar 24 11:15:06 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:06 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:06 DEBG cookie len is 0!
Mar 24 11:15:06 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:06 DEBG server hello verify was sent
Mar 24 11:15:06 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:06 DEBG got packet 22 (89 bytes)
Mar 24 11:15:06 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:06 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:06 DEBG found matching cookie
Mar 24 11:15:06 DEBG creating new peer
Mar 24 11:15:06 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:06 DEBG clear MAC
Mar 24 11:15:06 WARN unsupported tls extension: 23
Mar 24 11:15:06 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:06 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:06 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:06 DEBG got packet 22 (42 bytes)
Mar 24 11:15:06 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:06 DEBG new bitfield is               : 2
Mar 24 11:15:06 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:06 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:06 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:06 DEBG got packet 20 (14 bytes)
Mar 24 11:15:06 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:06 DEBG new bitfield is               : 5
Mar 24 11:15:06 DEBG key_block (40 bytes):
Mar 24 11:15:06 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:06 DEBG got packet 22 (53 bytes)
Mar 24 11:15:06 WARN decryption failed
Mar 24 11:15:06 INFO decrypt_verify() failed
Mar 24 11:15:09 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:09 DEBG got packet 22 (73 bytes)
Mar 24 11:15:09 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:09 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:09 DEBG cookie len is 0!
Mar 24 11:15:09 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:09 DEBG server hello verify was sent
Mar 24 11:15:09 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:09 DEBG got packet 22 (89 bytes)
Mar 24 11:15:09 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:09 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:09 DEBG found matching cookie
Mar 24 11:15:09 DEBG creating new peer
Mar 24 11:15:09 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:09 DEBG clear MAC
Mar 24 11:15:09 WARN unsupported tls extension: 23
Mar 24 11:15:09 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:09 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:09 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:09 DEBG got packet 22 (42 bytes)
Mar 24 11:15:09 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:09 DEBG new bitfield is               : 2
Mar 24 11:15:09 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:09 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:09 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:09 DEBG got packet 20 (14 bytes)
Mar 24 11:15:09 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:09 DEBG new bitfield is               : 5
Mar 24 11:15:09 DEBG key_block (40 bytes):
Mar 24 11:15:09 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:09 DEBG got packet 22 (53 bytes)
Mar 24 11:15:09 WARN decryption failed
Mar 24 11:15:09 INFO decrypt_verify() failed
Mar 24 11:15:12 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:12 DEBG got packet 22 (73 bytes)
Mar 24 11:15:12 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:12 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:12 DEBG cookie len is 0!
Mar 24 11:15:12 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:12 DEBG server hello verify was sent
Mar 24 11:15:12 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:12 DEBG got packet 22 (89 bytes)
Mar 24 11:15:12 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:12 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:12 DEBG found matching cookie
Mar 24 11:15:12 DEBG creating new peer
Mar 24 11:15:12 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:12 DEBG clear MAC
Mar 24 11:15:12 WARN unsupported tls extension: 23
Mar 24 11:15:12 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:12 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:12 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:12 DEBG got packet 22 (42 bytes)
Mar 24 11:15:12 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:12 DEBG new bitfield is               : 2
Mar 24 11:15:12 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:12 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:12 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:12 DEBG got packet 22 (42 bytes)
Mar 24 11:15:12 INFO Duplicate packet arrived (cseq=2)
Mar 24 11:15:12 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:12 DEBG got packet 22 (53 bytes)
Mar 24 11:15:12 ALRT No security context for epoch: 1
Mar 24 11:15:12 INFO decrypt_verify() failed
Mar 24 11:15:15 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:15 DEBG got packet 22 (73 bytes)
Mar 24 11:15:15 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:15 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:15 DEBG cookie len is 0!
Mar 24 11:15:15 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:15 DEBG server hello verify was sent
Mar 24 11:15:15 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:15 DEBG got packet 22 (89 bytes)
Mar 24 11:15:15 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:15 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:15 DEBG found matching cookie
Mar 24 11:15:15 DEBG creating new peer
Mar 24 11:15:15 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:15 DEBG clear MAC
Mar 24 11:15:15 WARN unsupported tls extension: 23
Mar 24 11:15:15 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:15 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:15 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:15 DEBG got packet 22 (42 bytes)
Mar 24 11:15:15 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:15 DEBG new bitfield is               : 2
Mar 24 11:15:15 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:15 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:15 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:15 DEBG got packet 20 (14 bytes)
Mar 24 11:15:15 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:15 DEBG new bitfield is               : 5
Mar 24 11:15:15 DEBG key_block (40 bytes):
Mar 24 11:15:15 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:15 DEBG got packet 20 (14 bytes)
Mar 24 11:15:15 INFO Duplicate packet arrived (cseq=3)
Mar 24 11:15:18 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:18 DEBG got packet 21 (31 bytes)
Mar 24 11:15:18 WARN decryption failed
Mar 24 11:15:18 INFO decrypt_verify() failed
Mar 24 11:15:18 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:18 DEBG got packet 22 (73 bytes)
Mar 24 11:15:18 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:18 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:18 DEBG cookie len is 0!
Mar 24 11:15:18 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:18 DEBG server hello verify was sent
Mar 24 11:15:18 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:18 DEBG got packet 22 (89 bytes)
Mar 24 11:15:18 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:18 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:18 DEBG found matching cookie
Mar 24 11:15:18 DEBG creating new peer
Mar 24 11:15:18 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:18 DEBG clear MAC
Mar 24 11:15:18 WARN unsupported tls extension: 23
Mar 24 11:15:18 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:18 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:18 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:18 DEBG got packet 22 (42 bytes)
Mar 24 11:15:18 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:18 DEBG new bitfield is               : 2
Mar 24 11:15:18 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:18 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:18 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:18 DEBG got packet 20 (14 bytes)
Mar 24 11:15:18 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:18 DEBG new bitfield is               : 5
Mar 24 11:15:18 DEBG key_block (40 bytes):
Mar 24 11:15:18 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:18 DEBG got packet 22 (53 bytes)
Mar 24 11:15:18 WARN decryption failed
Mar 24 11:15:18 INFO decrypt_verify() failed
Mar 24 11:15:21 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:21 DEBG got packet 22 (73 bytes)
Mar 24 11:15:21 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:21 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:21 DEBG cookie len is 0!
Mar 24 11:15:21 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:21 DEBG server hello verify was sent
Mar 24 11:15:21 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:21 DEBG got packet 22 (89 bytes)
Mar 24 11:15:21 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:21 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:21 DEBG found matching cookie
Mar 24 11:15:21 DEBG creating new peer
Mar 24 11:15:21 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:21 DEBG clear MAC
Mar 24 11:15:21 WARN unsupported tls extension: 23
Mar 24 11:15:21 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:21 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:21 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:21 DEBG got packet 22 (42 bytes)
Mar 24 11:15:21 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:21 DEBG new bitfield is               : 2
Mar 24 11:15:21 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:21 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:21 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:21 DEBG got packet 20 (14 bytes)
Mar 24 11:15:21 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:21 DEBG new bitfield is               : 5
Mar 24 11:15:21 DEBG key_block (40 bytes):
Mar 24 11:15:21 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:21 DEBG got packet 22 (53 bytes)
Mar 24 11:15:21 WARN decryption failed
Mar 24 11:15:21 INFO decrypt_verify() failed
Mar 24 11:15:24 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:24 DEBG got packet 22 (73 bytes)
Mar 24 11:15:24 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:24 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:24 DEBG cookie len is 0!
Mar 24 11:15:24 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:24 DEBG server hello verify was sent
Mar 24 11:15:24 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:24 DEBG got packet 22 (89 bytes)
Mar 24 11:15:24 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:24 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:24 DEBG found matching cookie
Mar 24 11:15:24 DEBG creating new peer
Mar 24 11:15:24 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:24 DEBG clear MAC
Mar 24 11:15:24 WARN unsupported tls extension: 23
Mar 24 11:15:24 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:24 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:24 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:24 DEBG got packet 22 (42 bytes)
Mar 24 11:15:24 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:24 DEBG new bitfield is               : 2
Mar 24 11:15:24 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:24 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:24 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:24 DEBG got packet 22 (42 bytes)
Mar 24 11:15:24 INFO Duplicate packet arrived (cseq=2)
Mar 24 11:15:24 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:24 DEBG got packet 22 (53 bytes)
Mar 24 11:15:24 ALRT No security context for epoch: 1
Mar 24 11:15:24 INFO decrypt_verify() failed
Mar 24 11:15:27 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:27 DEBG got packet 22 (73 bytes)
Mar 24 11:15:27 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:27 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:27 DEBG cookie len is 0!
Mar 24 11:15:27 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:27 DEBG server hello verify was sent
Mar 24 11:15:27 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:27 DEBG got packet 22 (89 bytes)
Mar 24 11:15:27 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:27 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:27 DEBG found matching cookie
Mar 24 11:15:27 DEBG creating new peer
Mar 24 11:15:27 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:27 DEBG clear MAC
Mar 24 11:15:27 WARN unsupported tls extension: 23
Mar 24 11:15:27 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:27 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:27 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:27 DEBG got packet 22 (42 bytes)
Mar 24 11:15:27 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:27 DEBG new bitfield is               : 2
Mar 24 11:15:27 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:27 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:27 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:27 DEBG got packet 22 (42 bytes)
Mar 24 11:15:27 INFO Duplicate packet arrived (cseq=2)
Mar 24 11:15:27 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:27 DEBG got packet 22 (42 bytes)
Mar 24 11:15:27 INFO Duplicate packet arrived (cseq=2)
Mar 24 11:15:27 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:27 DEBG got packet 22 (53 bytes)
Mar 24 11:15:27 ALRT No security context for epoch: 1
Mar 24 11:15:27 INFO decrypt_verify() failed
Mar 24 11:15:30 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:30 DEBG got packet 22 (73 bytes)
Mar 24 11:15:30 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:30 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:30 DEBG cookie len is 0!
Mar 24 11:15:30 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:30 DEBG server hello verify was sent
Mar 24 11:15:30 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:30 DEBG got packet 22 (89 bytes)
Mar 24 11:15:30 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:30 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:30 DEBG found matching cookie
Mar 24 11:15:30 DEBG creating new peer
Mar 24 11:15:30 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:30 DEBG clear MAC
Mar 24 11:15:30 WARN unsupported tls extension: 23
Mar 24 11:15:30 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:30 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:30 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:30 DEBG got packet 22 (42 bytes)
Mar 24 11:15:30 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:30 DEBG new bitfield is               : 2
Mar 24 11:15:30 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:30 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:30 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:30 DEBG got packet 22 (53 bytes)
Mar 24 11:15:30 ALRT No security context for epoch: 1
Mar 24 11:15:30 INFO decrypt_verify() failed
Mar 24 11:15:33 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:33 DEBG got packet 22 (73 bytes)
Mar 24 11:15:33 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:33 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:33 DEBG cookie len is 0!
Mar 24 11:15:33 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:33 DEBG server hello verify was sent
Mar 24 11:15:33 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:33 DEBG got packet 22 (89 bytes)
Mar 24 11:15:33 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:33 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:33 DEBG found matching cookie
Mar 24 11:15:33 DEBG creating new peer
Mar 24 11:15:33 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:33 DEBG clear MAC
Mar 24 11:15:33 WARN unsupported tls extension: 23
Mar 24 11:15:33 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:33 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:33 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:33 DEBG got packet 22 (42 bytes)
Mar 24 11:15:33 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:33 DEBG new bitfield is               : 2
Mar 24 11:15:33 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:33 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:33 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:33 DEBG got packet 20 (14 bytes)
Mar 24 11:15:33 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:33 DEBG new bitfield is               : 5
Mar 24 11:15:33 DEBG key_block (40 bytes):
Mar 24 11:15:33 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:33 DEBG got packet 22 (53 bytes)
Mar 24 11:15:33 WARN decryption failed
Mar 24 11:15:33 INFO decrypt_verify() failed
Mar 24 11:15:36 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:36 DEBG got packet 22 (73 bytes)
Mar 24 11:15:36 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:36 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:36 DEBG cookie len is 0!
Mar 24 11:15:36 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:36 DEBG server hello verify was sent
Mar 24 11:15:36 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:36 DEBG got packet 22 (89 bytes)
Mar 24 11:15:36 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:36 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:36 DEBG found matching cookie
Mar 24 11:15:36 DEBG creating new peer
Mar 24 11:15:36 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:36 DEBG clear MAC
Mar 24 11:15:36 WARN unsupported tls extension: 23
Mar 24 11:15:36 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:36 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:36 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:36 DEBG got packet 22 (42 bytes)
Mar 24 11:15:36 DEBG new packet arrived with seq_nr: 2
Mar 24 11:15:36 DEBG new bitfield is               : 2
Mar 24 11:15:36 DEBG received handshake packet of type: client_key_exchange (16)
Mar 24 11:15:36 DEBG handle handshake packet of type: client_key_exchange (16)
Mar 24 11:15:36 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:36 DEBG got packet 20 (14 bytes)
Mar 24 11:15:36 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:36 DEBG new bitfield is               : 5
Mar 24 11:15:36 DEBG key_block (40 bytes):
Mar 24 11:15:36 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:36 DEBG got packet 20 (14 bytes)
Mar 24 11:15:36 INFO Duplicate packet arrived (cseq=3)
Mar 24 11:15:36 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:36 DEBG got packet 22 (53 bytes)
Mar 24 11:15:36 WARN decryption failed
Mar 24 11:15:36 INFO decrypt_verify() failed
Mar 24 11:15:39 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:39 DEBG got packet 22 (73 bytes)
Mar 24 11:15:39 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:39 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:39 DEBG cookie len is 0!
Mar 24 11:15:39 DEBG send handshake packet of type: hello_verify_request (3)
Mar 24 11:15:39 DEBG server hello verify was sent
Mar 24 11:15:39 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:39 DEBG got packet 22 (89 bytes)
Mar 24 11:15:39 DEBG received handshake packet of type: client_hello (1)
Mar 24 11:15:39 DEBG handle handshake packet of type: client_hello (1)
Mar 24 11:15:39 DEBG found matching cookie
Mar 24 11:15:39 DEBG creating new peer
Mar 24 11:15:39 DEBG DTLSv12: initialize HASH_SHA256
Mar 24 11:15:39 DEBG clear MAC
Mar 24 11:15:39 WARN unsupported tls extension: 23
Mar 24 11:15:39 DEBG send handshake packet of type: server_hello (2)
Mar 24 11:15:39 DEBG send handshake packet of type: server_hello_done (14)
Mar 24 11:15:39 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:39 DEBG got packet 20 (14 bytes)
Mar 24 11:15:39 DEBG new packet arrived with seq_nr: 3
Mar 24 11:15:39 DEBG new bitfield is               : 4
Mar 24 11:15:39 WARN expected ChangeCipherSpec during handshake
Mar 24 11:15:42 DEBG dtls_handle_message: FOUND PEER
Mar 24 11:15:42 DEBG got packet 21 (31 bytes)
Mar 24 11:15:42 ALRT No security context for epoch: 1
Mar 24 11:15:42 INFO decrypt_verify() failed
Mar 24 11:15:45 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:45 DEBG got packet 21 (15 bytes)
Mar 24 11:15:45 INFO ** Alert: level 1, description 0
Mar 24 11:15:45 WARN got an alert for an unknown peer, we probably already removed it, ignore it
Mar 24 11:15:45 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:45 DEBG got packet 21 (15 bytes)
Mar 24 11:15:45 INFO ** Alert: level 1, description 0
Mar 24 11:15:45 WARN got an alert for an unknown peer, we probably already removed it, ignore it
Mar 24 11:15:45 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:45 DEBG got packet 21 (15 bytes)
Mar 24 11:15:45 INFO ** Alert: level 1, description 0
Mar 24 11:15:45 WARN got an alert for an unknown peer, we probably already removed it, ignore it
Mar 24 11:15:48 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:48 DEBG got packet 21 (15 bytes)
Mar 24 11:15:48 INFO ** Alert: level 1, description 0
Mar 24 11:15:48 WARN got an alert for an unknown peer, we probably already removed it, ignore it
Mar 24 11:15:51 DEBG dtls_handle_message: PEER NOT FOUND
Mar 24 11:15:51 DEBG got packet 21 (15 bytes)
Mar 24 11:15:51 INFO ** Alert: level 1, description 0
Mar 24 11:15:51 WARN got an alert for an unknown peer, we probably already removed it, ignore it

@leandrolanzieri
Copy link
Contributor Author

It makes sense to include the port for the cookie creation, this should be done as @miri64 proposes. I'll update this PR to add a patch to the package, and also make the PR with the same change upstream.

@miri64
Copy link
Member

miri64 commented Mar 24, 2022

It makes sense to include the port for the cookie creation, this should be done as @miri64 proposes. I'll update this PR to add a patch to the package, and also make the PR with the same change upstream.

See also doc on ->size initialization for Contiki: https://github.com/eclipse/tinydtls/blob/706888256c3e03d9fcf1ec37bb1dd6499213be3c/dtls.h#L719

@kfessel
Copy link
Contributor

kfessel commented Mar 24, 2022

Thank you for clearing that up @miri64 - i missed thinking of socket-addr as addr + port (or some other complete location information of the other end of the connection)

@leandrolanzieri
Copy link
Contributor Author

Turns out there already was a function to initialize the session, and sets the size member to sizeof(addr). I'll just go ahead and use it.

@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/tinydtls/fix_ep_to_session branch from cd980d4 to bca4f81 Compare March 24, 2022 11:21
@github-actions github-actions bot removed the Area: examples Area: Example Applications label Mar 24, 2022
@leandrolanzieri
Copy link
Contributor Author

Upstream PR at eclipse-tinydtls/tinydtls#127

@miri64
Copy link
Member

miri64 commented Mar 24, 2022

I'm fine with the changes, how they are at the moment. My faults indicate, that there is most likely yet another overflow somewhere, but that's a challenge for another day. Please squash.

@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/tinydtls/fix_ep_to_session branch from 1590e50 to 981e4aa Compare March 24, 2022 12:42
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK from my side.

@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/tinydtls/fix_ep_to_session branch from 981e4aa to 53b6aba Compare March 24, 2022 16:05
@leandrolanzieri
Copy link
Contributor Author

CI failed because I did not update the example to the new structure. It should be fixed now

@github-actions github-actions bot added the Area: examples Area: Example Applications label Mar 24, 2022
@leandrolanzieri leandrolanzieri added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 24, 2022
@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 24, 2022
@leandrolanzieri
Copy link
Contributor Author

Murdock is green, not sure what's up with the other checks

@miri64
Copy link
Member

miri64 commented Mar 25, 2022

I guess another Github outage? Could you force-push?

@miri64 miri64 added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Mar 25, 2022
@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/tinydtls/fix_ep_to_session branch from 53b6aba to 05db36a Compare March 25, 2022 08:44
@miri64 miri64 merged commit 844279f into RIOT-OS:master Mar 25, 2022
@boaks
Copy link

boaks commented Mar 29, 2022

To be clear, since the size member doc for POSIX says, it should be the size of addr (where the port is included),

Yes, that's the way dtls_create_cookie adds the peer's source source address to the cookie's hash.

dtls_hmac_update(&hmac_context,
		   (unsigned char *)&session->addr, session->size);

I left some comments in the tinydtls PR.

@OlegHahm OlegHahm added this to the Release 2022.04 milestone Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: examples Area: Example Applications Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants