Restore DNS policy parity under WireGuard - #738
Merged
Conversation
A computed checksum of zero is mapped to 0xffff only for UDP, where zero means "no checksum" (RFC 768). TCP has no such convention, so encoding a zero there corrupted the rewritten segment; because every retransmission is rewritten identically, the receiver would have dropped each copy and the DNS-over-TCP lookup would hang instead of failing fast. Also drop the per-segment clone of the reassembly buffer: the residual frame can be up to 64 KiB, so cloning it for every arriving segment made frame detection quadratic in the size of a TCP response.
kasnder
marked this pull request as ready for review
August 20, 2026 10:18
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.
Summary
DNS =line, so the UI no longer claims that an inert DoH proxy is active and the app does not send DoH outside the tunnelVerification
cargo test: 30 passed:app:testGithubDebugUnitTest: 219 passed, 0 failuresassembleGithubDebug: passed, including native C and Rust for all four Android ABIsadb install -r: existing WireGuard profile with noDNS =line stayed connectedSecure DNS proxy disabled while WireGuard egress is active; the original disabled preference and active VPN were restored afterwardKnown limit
DNS-over-TCP responses split across segments are recorded but deliberately left unchanged. Rewriting those safely requires buffering plus TCP sequence translation; continuation segments cannot be treated as fresh DNS frames.
Closes #734
Closes #736