net: Support all valid IP_MTU_DISCOVER values for UDP and TCP#12866
Merged
copybara-service[bot] merged 2 commits intomasterfrom Apr 3, 2026
Merged
net: Support all valid IP_MTU_DISCOVER values for UDP and TCP#12866copybara-service[bot] merged 2 commits intomasterfrom
copybara-service[bot] merged 2 commits intomasterfrom
Conversation
The UDP endpoint only accepted PMTUDiscoveryDont and the TCP endpoint rejected PMTUDiscoveryProbe, causing QUIC libraries (quic-go) to fail when setting IP_PMTUDISC_DO or IP_PMTUDISC_PROBE on UDP sockets. Accept all valid PMTUD strategies (DONT/WANT/DO/PROBE) for both UDP and TCP, since gVisor does not implement ICMP-based PMTU feedback, `PROBE` and `DO` are functionally equivalent — both set DF but neither updates a cached route PMTU. Test: UdpSocketTest.SetPMTUD, TcpSocketTest.SetPMTUD Signed-off-by: Tan Yifeng <yiftan@tencent.com>
36bdfd4 to
9fcde43
Compare
PiperOrigin-RevId: 894240043
9fcde43 to
0f29b0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
net: Support all valid IP_MTU_DISCOVER values for UDP and TCP
The UDP endpoint only accepted PMTUDiscoveryDont and the TCP endpoint rejected PMTUDiscoveryProbe, causing QUIC libraries (quic-go) to fail when setting IP_PMTUDISC_DO or IP_PMTUDISC_PROBE on UDP sockets.
Accept all valid PMTUD strategies (DONT/WANT/DO/PROBE) for both UDP and TCP, since gVisor does not implement ICMP-based PMTU feedback,
PROBEandDOare functionally equivalent — both set DF but neither updates a cached route PMTU.Test: UdpSocketTest.SetPMTUD, TcpSocketTest.SetPMTUD
FUTURE_COPYBARA_INTEGRATE_REVIEW=#12852 from tanyifeng:net-ip-mtu-discover 03548dc