Skip to content

Allow not handled packets for UDP Forwarder #11879

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jul 1, 2025

Allow not handled packets for UDP Forwarder

For TCP forwarder, we can reset the connection with r.Complete(true). For UDP forwarder, there was no way to reset the connection.

gVisor already sends ICMP port unreachable for unhandled packets, but udp.Forwarder.HandlePacket always returns true.

So we change the handler's function signature to return a bool type value, indicating whether the packet was handled or not. Thus allowing us to send ICMP port unreachable for failed UDP connections.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11850 from OkamiW:udp-forwarder-not-handled-packets 496c218

@copybara-service copybara-service bot added the exported Issue was exported automatically label Jul 1, 2025
@copybara-service copybara-service bot force-pushed the test/cl777960633 branch 2 times, most recently from f5dc9ab to 6a08a1d Compare July 9, 2025 19:39
For TCP forwarder, we can reset the connection with r.Complete(true). For UDP forwarder, there was no way to reset the connection.

gVisor already sends ICMP port unreachable for unhandled packets, but udp.Forwarder.HandlePacket always returns true.

So we change the handler's function signature to return a bool type value, indicating whether the packet was handled or not. Thus allowing us to send ICMP port unreachable for failed UDP connections.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11850 from OkamiW:udp-forwarder-not-handled-packets 496c218
PiperOrigin-RevId: 777960633
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exported Issue was exported automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant