* Use default local address, if request is from multicast address
If response to multicast request is sent, local address must be set to
default.
* Fix unit tests
Fixed socket_listen stub.
Secure sending code was passing the remote address as the source
address, bizarrely. This records the local address last used as the
destination for incoming packets and uses that.
Other fix-ups:
* dest_addr (ie remote address) removed from internal_socket_t; this isn't
safe, as one socket talks to multiple remote peers. Use address in
secure_session_t instead.
* Some renaming: listen_socket->socket, send/receive callbacks,
remote_address+remote_port -> remote_host
When handshake fails, or DTLS session is closed, all transactions must
be removed from coap protocol retransmission queue. Otherwise coap
retransmission will start new handshake.
NS_USE_EXTERNAL_MBED_TLS now controls whether we attempt to include
mbedTLS header files at all, and after including them, we check whether
SSL/TLS is enabled. If not, we provide non-secure operation only.
Make connection handler deal with all addressing, and hide the internals
of security handler.
Will allow security handler code to be stubbed out if mbed TLS is not
available.
When receiving data, destination (own) address is stored and given to
socket when sending reply to make sure respone comes always from same
address where request was sent. This commit supports only real socket to
real socket messages, not virtual socket, or DTLS handshake messages.
This fixes unstability issues. Still need to refactor
coap_security_handler_read()-function to work as specified in mbedTLS
documentation. This commit should be treated as a temporary fix.