-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional check for ALOC as destination address of CoAP request messages. #1164
Add additional check for ALOC as destination address of CoAP request messages. #1164
Conversation
Current coverage is 71.69% (diff: 80.00%)@@ master #1164 diff @@
==========================================
Files 128 128
Lines 17631 18792 +1161
Methods 2496 2637 +141
Messages 0 0
Branches 2128 2273 +145
==========================================
+ Hits 12940 13473 +533
- Misses 3890 4455 +565
- Partials 801 864 +63
|
if (((aRequestMetadata.mDestinationAddress == aMessageInfo.GetPeerAddr()) || | ||
aRequestMetadata.mDestinationAddress.IsMulticast()) && | ||
(aRequestMetadata.mDestinationPort == aMessageInfo.GetPeerPort())) | ||
if (aRequestMetadata.mDestinationPort == aMessageInfo.GetPeerPort()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider using IsAnycastRoutingLocator as an additional check for destination address instead of removing address checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Can we special case the anycast address as the original code did with the multicast address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated and tested. Please have a check. Thanks.
- Add additional check for ALOC as the destination address of CoAP request messages. - Leader uses RLOC instead of ALOC as source address to response messages.
29475ee
to
8b8c95a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
- Add additional check for ALOC as the destination address of CoAP request messages. - Leader uses RLOC instead of ALOC as source address to response messages.
…ub_02712ff to master * commit '6572d839fe0879af1ee11f97902f0193827106c5': Fix a python sniffer stop method (Remove deadlock). (openthread#1163) Python Sniffer Implementation for Windows (openthread#1147) Fix few bugs: (openthread#1164) Fix Route TLV handling during reattach. (openthread#1168) Convert `MeshHeader` constructors to fail-able initializers (openthread#1157)
Interop with NXP, notice that when OT as commissioner and NXP as Leader, OT sends the MGMT_COMM_SET.req to Leader's ALOC address, NXP node will response CoAP message with its RLOC unicast address, this will cause CoAP message retransmission due to the src/dst address mismatches. (Depends on the port, message id and token, so remove the address comparison). Thus Harness cannot find the correct packets, influences 9.2.2-commissioner and 9.2.4-commissioner. Screenshot as below:
Another enhancement is to select Leader's RLOC unicast address instead of ALOC as source address to response messages. Please have a check.