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

Add large_payload_behavior arg to net::recv_packet() #673

Merged
merged 2 commits into from Aug 2, 2022

Conversation

jgallagher
Copy link
Contributor

This fixes the ability of an external UDP source crashing net clients with ClientError::BadLease by sending packets in between their lease size and the max size allowed by the net task.

Unfortunately it continues to pour fuel on the fire of server.rs + vlan.rs.

@jgallagher jgallagher requested a review from cbiffle August 1, 2022 21:05
Copy link
Collaborator

@cbiffle cbiffle left a comment

Choose a reason for hiding this comment

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

Looks right to me.

One reason to do this as two separate operations (...in the future), now that I see the code, is so that they could return more precise error types, since the Discard variant can't produce TooLarge, yet right now clients are forced to handle it by the compiler.

@jgallagher jgallagher force-pushed the net-add-large-payload-behavior branch from 1919ab6 to 00a0a3c Compare August 2, 2022 14:44
@jgallagher jgallagher merged commit 237a6b8 into master Aug 2, 2022
@jgallagher jgallagher deleted the net-add-large-payload-behavior branch August 2, 2022 15:35
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.

None yet

2 participants