Conversation
dany74q
force-pushed
the
newroute-gateway-family
branch
3 times, most recently
from
September 26, 2026 19:17
fb414f8 to
97aed63
Compare
A route request without RTA_DST picked IPv4 or IPv6 from the length of RTA_GATEWAY and never read rtm_family, so AF_INET with a 16-byte gateway installed an IPv6 default route, AF_INET6 with a 4-byte gateway installed an IPv4 one, and a request with any other family was accepted. Linux dispatches the request on rtm_family and validates RTA_GATEWAY against the family it selects. localRoute now takes a default route's family from rtm_family and answers EOPNOTSUPP when it is neither AF_INET nor AF_INET6. It refuses an RTA_GATEWAY shorter than that family's address with ERANGE and reads a longer one for its leading bytes, as Linux does. RTM_DELROUTE shares the parse and changes the same way. Routes with RTA_DST are unchanged. Fixes google#14918
dany74q
force-pushed
the
newroute-gateway-family
branch
from
September 28, 2026 18:32
97aed63 to
1401419
Compare
Contributor
Author
|
friendly ping @relkochta |
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.
No description provided.