Repository navigation
mwan3: omit nexthop IDs when replaying expanded single nexthops - #30803
ZyPulse-zy wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Default nexthop compatibility dumps include nhid together with via/dev fields. iproute2 rejects replaying both, so startup, ifup and route-monitor copies fail. Remove the redundant nhid only when an inline nexthop is present; preserve valid ID-only routes. Add an isolated actual-function/kernel regression covering IPv4/IPv6 route copying, gateway updates, deletion, route attributes, shared routes, ID-only replay and legacy flags. All 45 checks pass with BusyBox ash, including shell sources extracted from the actual AArch64/musl SDK-built APK. Signed-off-by: Yuen Su <zypulsecore@gmail.com>
6c3efeb to
c9436da
Compare
| route_modifiers="$route_modifiers s/ linkdown / /; s/ linkdown$/ /;" | ||
| route_modifiers="$route_modifiers s/expires [0-9]\+sec//;" | ||
| route_modifiers="$route_modifiers s/error [0-9]\+//;" | ||
| # iproute2 expands nexthop objects into via/dev fields. Replaying both |
There was a problem hiding this comment.
nit (optional): the kernel adds the via/dev expansion to the dump when nexthop_compat_mode is on, not iproute2. The PR body and README say the same thing.
| # iproute2 expands nexthop objects into via/dev fields. Replaying both | |
| # With nexthop_compat_mode the kernel dumps nhid plus its via/dev |
Generated by Claude Code
| @@ -0,0 +1,150 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
nit: CI never runs this script: it needs root, a separate netns and host iproute2, and net/mwan3/test.sh doesn't call it. The other in-tree suites (net/pbr/tests/run_tests.sh, net/adblock-fast/tests/) are shell-based. Should this test (and the host-specific notes in tests/README.md) live in the tree, or only in the PR description?
Generated by Claude Code
Default nexthop compatibility dumps contain both nhid and the expanded via/dev definition. Replaying that line makes iproute2 reject the route with "Nexthop specification and nexthop id are mutually exclusive", breaking mwan3 startup, ifup and monitor-handler copies.
Remove the redundant ID only when the route contains an inline via/dev nexthop. Preserve valid ID-only routes and the remaining route attributes. Increment PKG_RELEASE. The kernel's nexthop compatibility mode emits route notifications on nexthop changes, so the existing expanded-route monitor model can continue following gateway updates: https://docs.kernel.org/networking/ip-sysctl.html
Maintainer: @feckert
Validation:
Run-test environment: host Linux 7.0.0-38, iproute2 6.19.0; independent Ubuntu CI. Device: none. UCI/network status/ipset I/O is bounded fixture data; kernel route operations are real. Tests refuse to run outside a distinct network namespace and generate no packets. Multiline/multipath groups, resilient/encapsulated nexthops and the running daemon loop are outside this regression's coverage.
Developed with AI assistance and validated as described.
Fixes #27066