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

quic: handle incoming packets with unknown destination address #32691

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

danzh2010
Copy link
Contributor

Commit Message: QUIC client sockets always enable socket options to read destination address of the incoming UDP packets. But in some cases, the address is not returned via the system call, recvmsg or recvmmsg. In such case, Quic connection should drop the packets. And if there are a lot of such packets, the connection should be closed with detailed error sent to the server.

Risk Level: n/a
Testing: n/a
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Dan Zhang <[email protected]>
@danzh2010
Copy link
Contributor Author

/retest

Signed-off-by: Dan Zhang <[email protected]>
Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

Looks good, though i think this issue is with source addresses not destination addresses.

ASSERT(buffer->getRawSlices().size() == 1);
if (local_address == nullptr) {
// Quic doesn't know how to handle packets without destination address. Drop them here.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The problem is local_address being null, which is "source address" not "destination address", right? (peer_address would be "destination address", I think).

Here, and elsewhere, including the PR description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is the destination address of the incoming packet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh good lord! Yes, you're right, of course. Sorry!

@RyanTheOptimist RyanTheOptimist enabled auto-merge (squash) March 5, 2024 16:24
@RyanTheOptimist RyanTheOptimist merged commit f26361e into envoyproxy:main Mar 5, 2024
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants