mwan3: prefer default route source address#29801
Open
dhrm1k wants to merge 1 commit into
Open
Conversation
feckert
requested changes
Jun 24, 2026
6f0a0dc to
7b6ba4e
Compare
feckert
requested changes
Jun 26, 2026
| PKG_NAME:=mwan3 | ||
| PKG_VERSION:=2.12.1 | ||
| PKG_RELEASE:=1 | ||
| PKG_RELEASE:=2 |
Member
There was a problem hiding this comment.
This is a feature change. So we have to bump the PKG_VERSION by one and not the PKG_RELEASE.
Prefer the source address from the interface default route before falling back to the interface address from netifd. This fixes diagnostics and tracking in setups where the route-selected source address differs from the interface address. Fixes: openwrt#29055 Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
7b6ba4e to
b264471
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.
Prefer the
srcaddress from the interface default route before falling backto the interface address from netifd.
This fixes the diagnostics/tracking case where an interface has one address,
but the default route explicitly selects a different source address.
Fixes: #29055
Package Details
Maintainer: @feckert
Description:
Fix
mwan3_get_src_ip()so it uses the default route's preferred sourceaddress when one is present.
Run Testing Details
Tested the source address selection on an OpenWrt VM with mocked route and
netifd values.
With a default route containing
src 203.0.113.50,mwan3_get_src_ip()nowreturns:
When the default route does not contain
src, it still falls back to theinterface address:
Local checks:
Formalities
If your PR contains a patch: