-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Establish new associations with existing parameters #253
Comments
I'm not a 100% sure I'm following. Are you saying that after a reboot your client is not able to reconnect to a server? |
That's right. It's a hard reset, i.e., the client doesn't get a chance to send a CloseNotify alert. I've enabled logging in the server and it reports The linked RFC section says the server should proceed with a new handshake in this case. |
This issue is a blocker for my project. I imagine it is relevant for others, as well. An unsatisfactory workaround is to close the server after a timeout has expired. The problem with this solution is that the timeout needs to be sufficiently large to avoid rehandshaking on every transmission. But such a large timeout will mean reconnections after silently abandoning a connection will have significant delay. For my application that delay would be several hours. I will look into solving this issue. If anyone more familiar with the code has any tips, I'd be glad to hear them 😄 By the way, thanks for the great library! |
I'd like to get a confirmation of whether or not this feature would be accepted into the package before I put any work into implementing it. Can you give some feedback, @daenney? This feature feels a bit like renegotiation, but the RFC doesn't describe it that way. Renegotiation is an explicitly excluded feature from this package, hence my uncertainty about acceptance. I had a look at the code and I think it shouldn't be too painful. I only worry that there might be code that assumes once a handshake is complete that it won't start again. |
I don't have any issue with it, though it's worth noting the RFC said "should", not "must", when it comes to supporting this feature. This would indicate to me clients should be able to somehow cope with the server not supporting this, but there's no information in the RFC as to what that would look like. |
Indeed, using an ephemeral source port worked for me. Why didn't I think of that before? 😆 I leave it up to you guys whether this is something you want. |
Hi @gordonklaus , |
Hi @rtechencheng . You can read about ephemeral ports here. To obtain an ephemeral source port, you can either specify the port of the local address to be zero when you |
Hi @gordonklaus . Thanks for your reply! |
@rtechencheng The server doesn't have to do anything special. An ephemeral port is just like any other port; it's just that the port number is chosen randomly. |
@gordonklaus Thanks a lot. But I confirmed in my project that we are not going to use an ephemeral port in our client. |
I am going to resolve this as 'Will not implement'. If people disagree please re-open. I am happy to re-consider.
|
Summary
RFC 6347, section 4.2.8 describes how a server can allow a client that has silently abandoned its connection to re-establish its association with the server.
Motivation
The motivation is to support clients that silently abandon their connections with a pion/dtls server and then initiate new connections, e.g. after a reboot. My specific use case is when my device (an nRF9160) is forcibly reset and is then unable to make a new connection.
Describe alternatives you've considered
I've considered never forcibly resetting my device 😄 But these things are sometimes out of one's control, e.g. if a device deployed in the field loses power. And during development, resetting the device is part of the normal development workflow.
The text was updated successfully, but these errors were encountered: