You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the merge of #558, we now support the use of net.PacketConn in the DTLS Client and Server. However, because the Listener is based on pion/transport's UDP Listener, we wrap the returned net.Conn in a net.PacketConn and thus are bound to using the same remote address for the duration of the session.
Motivation
Supporting changing the remote address is important following the implementation of Connection ID support, as an alternative identifier is able to be used, and sessions can update their remote address to continue communicating with the remote endpoint. However, using the wrapped net.Conn does not allow us to update the remote address, and the underlying UDP Listener will not send datagrams to an existing connection unless the IP address / port matches. This needs to be configurable when supporting Connection IDs:
If a connection ID is being used, datagrams should be routed based on the connection ID
If a connection ID not being used, datagrams should be routed based on the IP address / port
It is important to note that a single DTLS server may be serving some connections that are using connection IDs alongside others that are not. Additionally, handshake datagrams do not use the connection ID, so they must be routed based on IP address / port until the connection ID is negotiated, at which point they must switch to being routed based on connection ID.
Describe alternatives you've considered
My initial attempt was in pion/transport#252, but it became clear that this will need to be more closely integrated with pion/dtls rather than being a generic implementation used across libraries (i.e. the behavior only makes sense in the context of DTLS usage).
Additional context
Note that packetio.Buffer will also need to be ported to this library.
The text was updated successfully, but these errors were encountered:
Summary
After the merge of #558, we now support the use of
net.PacketConn
in the DTLSClient
andServer
. However, because theListener
is based onpion/transport
's UDPListener
, we wrap the returnednet.Conn
in anet.PacketConn
and thus are bound to using the same remote address for the duration of the session.Motivation
Supporting changing the remote address is important following the implementation of Connection ID support, as an alternative identifier is able to be used, and sessions can update their remote address to continue communicating with the remote endpoint. However, using the wrapped
net.Conn
does not allow us to update the remote address, and the underlying UDPListener
will not send datagrams to an existing connection unless the IP address / port matches. This needs to be configurable when supporting Connection IDs:It is important to note that a single DTLS server may be serving some connections that are using connection IDs alongside others that are not. Additionally, handshake datagrams do not use the connection ID, so they must be routed based on IP address / port until the connection ID is negotiated, at which point they must switch to being routed based on connection ID.
Describe alternatives you've considered
My initial attempt was in pion/transport#252, but it became clear that this will need to be more closely integrated with
pion/dtls
rather than being a generic implementation used across libraries (i.e. the behavior only makes sense in the context of DTLS usage).Additional context
Note that
packetio.Buffer
will also need to be ported to this library.The text was updated successfully, but these errors were encountered: