Skip to content
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

What is the proper way to recovery the connection when UPD socket changes? #887

Open
psionic12 opened this issue Mar 30, 2021 · 2 comments
Labels
question Further information is requested

Comments

@psionic12
Copy link

psionic12 commented Mar 30, 2021

According to the doc:

QUIC connections are not strictly bound to a single network path. Connection migration uses connection identifiers to allow connections to transfer to a new network path. Only clients are able to migrate in this version of QUIC. This design also allows connections to continue after changes in network topology or address mappings, such as might be caused by NAT rebinding.¶

Does the UDP socket changes counts "network path changed"? Since the Quiche API do not need a socket fd to passed in, I guess Quiche connection is dependent with sockets.

Then I did a test: First I create a Quiche+H3 connection and sending requests, it works well. Then before the connection closed, I create a new socket, and send requests with this new one.

But each time I tried this, the library said:

quiche: da224c50979456051252ba5dfae97fc8 rx pkt Short dcid=bc16ec7742ebc3f1b73e2b3b784cae2a key_phase=true len=49 pn=5607456
quiche: da224c50979456051252ba5dfae97fc8 dropped invalid packet

it considered my requests as invalid packet. I tried calling on_timeout()(since on_timeout() does the recovery jobs) after creating a new socket, but still not working.

So what is the proper way to do this?

P.S. re-use Quiche connection while socket changing is extremely useful, in case a user's network changes from 4G to Wifi.

@ghedo
Copy link
Member

ghedo commented Apr 1, 2021

We don't really support network migration yet (e.g. we don't probe/validate new paths), but in your specific case I think there might be something else going on with your application, as you wouldn't see the "invalid packet" error even if the migration happened.

@psionic12
Copy link
Author

Hi @ghedo, So what is the expected behavior (for now) in the case I mentioned above? Does the server just ignore my packet which is sent from the new UPD socket, and my client never receive a response?

@dknecht dknecht added the question Further information is requested label Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants