Fix zero MTU on added peers - #169
Merged
Merged
Conversation
We would like to test MTU values in newly-added routes, so parse the RTAX_MTU (from the nested RTA_METRICS attribute) in NLSocket._parse_route(), and use the parsed valuq in the Route constructor. This resolves a pending TODO. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Commit 83cbe46 moved peer route creation to an earlier point, before the peer->mtu had been set in setup_added_peer(). This means we never use the minimum MTU value in created routes, so lose the safety of a known-good MTU setting. The setup_added_peer() path is really the wrong place for MTU initialisation; this is for property querying. Instead, set the initial MTU when the peer is constructed. Fixes: 83cbe46 ("mctpd: remove add_peer_route() from setup_added_peer()") Reported-by: Brian McKenzie <Brian.McKenzie@amd.com> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
jk-ozlabs
force-pushed
the
dev/peer-min-mtu
branch
from
August 18, 2026 05:41
56f3d7b to
f033b5f
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.
v2.6 introduces a regression where peers are added with a zero MTU, rather than the interface-defined minimum, as we were adding the peer routes before setting
peer->mtu.Move the default-MTU initialisation to the peer constructor instead.