Comments (9)
The proposed approach in #9800 (comment) sounds good to me!
from openthread.
Thinking more on this here is my proposal.
- We remove the change from [#6532] and make sure mesh-local addresses are again marked as preferred within OT core.
- We provide mechanism for the platform code to easily distinguish mesh-local addresses.
- We update the platform code which mirrors/updates the Thread addresses on host network interface to add mesh-local addresses as non-preferred.
- This platform behavior can be configurable which can provide a solution for #8443.
Setting mesh-local address within OT as deprecated/non-preferred for the host does not align with intended use of mesh-local address within Thread mesh and we see that it does impact the source selection logic.
There are two ways for platform to get the addresses:
- Iterate through the list of
otNetifAddress
.- The
otNetifAddress
struct already providesmMeshLocal
to indicate that address is mesh-local
- The
- Register a callback using
otIp6SetAddressCallback()
and gettingotIp6AddressInfo
- We can add a
mMeshLocal
field inotIp6AddressInfo
as well to make it easier for platform.
- We can add a
Thoughst? @jwhui @librasungirl @bukepo
from openthread.
A quick local validation with a build w/o #9634 1000/1000 PASS
@abtink seems related to this PR #9634
from openthread.
Manually added address is always preferred, and has global scope by default; MeshLocal address is of RealmLocal scope and init as non-preferred by default.
When SelectSource, in the for() loop, if Manually added address is after MeshLocal address in the interface's unicast address array, the Manually added address will win as it's preferred.
Here with #9801 which init MeshLocal address as preferred, this test can pass 1000/1000 runs。
Any more context to mark mesh local as non preferred?thoughts on the quick fix #9801? @abtink
from openthread.
Thanks @librasungirl for debugging this. 👍.
I had noticed the frequent test failures and AssertError(kRefresh)
state recently and was planning to investigate when I had some time. I suspected a timing issue where we might be checking for registration too early. Glad you found the root cause! 😃
On #9801 and marking mesh local as preferred, it makes sense to me, but I wonder why was it not set as such before?
- If I am not mistaken, this has been always the case in OT stack? Was it an omission or may be intentional?
- I wonder if marking mesh-local as preferred may cause issues on platform side where Thread interface addresses are mirrored on
wpan
interface (having mesh-local addresses be marked as preferred?) - I feel safer not change it without knowing more about the reasons behind this?
Related to PR #9634:
- It is a correct/important fix for a bug in
SelectSource()
. - But I think the unfortunate side-effect of this bug was that it masked this situation making the
srp_auto_address
test work reliably.
Some ideas:
- We can update the test itself. It is adding a new address without adding a prefix for it in netdata? So I think the address is practically not usable/reachable? We can add a (non-SLAAC on-mesh) prefix for it in the test case?
- We can add a new rule to
SelectSource()
to always pick mesh-local source if dest is also mesh-local?- We already have a similar rule which picks RLOC when dest is RLOC.
- This seems reasonable to me and may be a good enhancement to add anyways. Thoughts?
from openthread.
I did a bit of checking through the code/commit history. The mesh-local addresses were originally marked as preferred but this was changed in this PR (from ~May 2021)
This commit marks anycast addresses and mesh-local addresses as IPv6 non-preferred addresses.
The background is host IPv6 stack(such as lwIP, Linux kernel and so on) cannot tell these addresses to OMR addresses from the scope id. By marking these addresses non-preferred, the host IPv6 stack will not select these addresses as the source address of application layer traffic unless explicitly assigned.
from openthread.
A related issue:
from openthread.
Submitted
from openthread.
We can close this as #9815 is merged.
from openthread.
Related Issues (20)
- -Wundef - no default for OPENTHREAD_CONFIG_TLS_ENABLE
- -Wundef - no default for OPENTHREAD_ENABLE_VENDOR_EXTENSION/OPENTHREAD_EXAMPLES_SIMULATION HOT 1
- Method rename after tcat merge
- Using deprecated address after prefix removal from netdata HOT 2
- Implement CLI commands for DHCPv6 PD related features
- Web interface, Topology hangs?
- `MATN_15_ChangeOfPrimaryBBRTriggersRegistration.py` is flaky
- Avoid sending Link Request if the router device is powered down for duration greater than MAX_NEIGHBOR_AGE HOT 5
- [TCP] More bytes were acked than are in the send buffer HOT 1
- [Question] [MLE] Border router initialisation
- DNS client: default query/browse server should be the local Thread Service Registry HOT 8
- The SRP client registers a new host name with the same key pair, and the SRP server responds the Name exists. HOT 9
- Child ID request from recently restored SED dropped due to Security error HOT 11
- CLI unresponsive after multi-count ping command HOT 2
- unexpected test failing test_mlr_multicast_routing_across_thread_pans.py HOT 1
- unexpected test failing test_manual_maddress.py
- Data poll delayed when receiving fragmented packets HOT 8
- HardFault during otInstance initialization HOT 1
- Reading information from socket failed (Apple Homepod mini as Thread Border Router)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openthread.