mwan3: common.sh: fix src_ip detection for ipv6-PD
authorFabian Groffen <redacted>
Tue, 2 Sep 2025 11:20:13 +0000 (13:20 +0200)
committerFlorian Eckert <redacted>
Wed, 3 Sep 2025 13:42:20 +0000 (15:42 +0200)
commit47fd548a71332ad253a8ddbf3b0b2f7975714647
tree0ebbb31e71d24171bfb31ec7fc265a4235afb044
parentf933e028f502e9fc5c6bbf1176057253dd02a4e9
mwan3: common.sh: fix src_ip detection for ipv6-PD

IPv6 via PPPoE often receives a prefix, not an address. In that case
mwan3_get_src_ip would not find an address and fall back to ::.  However
in case of multiple IPv6 upstreams, this no longer means a ping (such as
done by uptime check) succeeds, for there are multiple addresses.

With this, mwan3 can effectively load-balance/fail-over on a PPPoE IPv6
prefix and a secondary (LTE) acquired /64 without immediately disabling
the IPv6 prefix interface as soon as the secondary IPv6 interface comes
up.

I think this change is also a fix to #26690
but I'm not 100% sure of that.

Signed-off-by: Fabian Groffen <redacted>
net/mwan3/files/lib/mwan3/common.sh
git clone https://git.99rst.org/PROJECT