Skip to content

fix: apply MTU to multi-path routes in routetable#12948

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-code-review-suggestion
Draft

fix: apply MTU to multi-path routes in routetable#12948
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-code-review-suggestion

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

bestTarget.MTU was silently dropped for multi-path routes because kernRoute.MTU was only assigned inside the single-path else branch.

Change

Move MTU into the base kernelRoute struct initialisation so it is set regardless of whether the route is single- or multi-path:

// Before
kernRoute := kernelRoute{
    ...
    Protocol: proto,
    // MTU absent here
}
if len(bestTarget.MultiPath) > 0 {
    // MTU never reaches the kernel for multi-path routes
} else {
    kernRoute.MTU = bestTarget.MTU  // only single-path got MTU
}

// After
kernRoute := kernelRoute{
    ...
    Protocol: proto,
    MTU:      bestTarget.MTU,  // applies to both single- and multi-path
}

Test

Added "Should program MTU on a multi-path route and correct an incorrect MTU on resync" to the existing multi-path route test suite. The test:

  1. Programs a multi-path route with MTU=1400 and verifies it is set on the kernel route.
  2. Corrupts the MTU to 9000 in the mock dataplane behind the RouteTable's back.
  3. Triggers a full resync and verifies the correct MTU is restored.

…lti-path routes

Co-authored-by: fasaxc <469264+fasaxc@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code based on review comment fix: apply MTU to multi-path routes in routetable Jun 10, 2026
Copilot AI requested a review from fasaxc June 10, 2026 12:26
Comment thread felix/routetable/route_table.go
Co-authored-by: fasaxc <469264+fasaxc@users.noreply.github.com>
Copilot AI requested a review from fasaxc June 10, 2026 12:38
@marvin-tigera marvin-tigera added this to the Calico v3.33.0 milestone Jun 11, 2026
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jun 11, 2026
@fasaxc fasaxc removed this from the Calico v3.33.0 milestone Jun 16, 2026
@marvin-tigera marvin-tigera added this to the Calico v3.33.0 milestone Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-pr-required Change is not yet documented release-note-required Change has user-facing impact (no matter how small)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants