-
Notifications
You must be signed in to change notification settings - Fork 38
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
Regular OpenThread upmerge to e10a925
#162
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Cristib05 <[email protected]>
This commit adds a new property SPINEL_PROP_NET_LEAVE_GRACEFULLY. The host can trigger otThreadDetachGracefully by setting this spinel property. Hence a SetProperty handler is implemented for this property. A GetProperty handler is also added for this property for a property response.
…348) This commit adds `ReadAndSave{Active/Pending}Dataset()` helper methods to `Mle::RxMessage` to read the Active or Pending Dataset from a received MLE message and save it in the corresponding `DatasetManager`. This commit also refactors the code for parsing the MLE TLVs, moving it from `DatasetManager` to the `Mle` class for better alignment of responsibilities.
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@e92390c...0d4c9c5) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… (#10050) This commit implements a generic discovery proxy in the DNS-SD server. It uses a set of newly added `otPlatDnssd` platform DNS-SD(mDNS) APIs to start or stop browsers, SRV/TXT resolvers, and IPv6/IPv4 address resolvers. These APIs closely match the native OpenThread mDNS implementation. OpenThread DNS-SD's existing `QueryCallback` mechanism, enabling customized discovery proxy implementations, remains supported. This commit includes a comprehensive unit test. This test validates the discovery proxy's behavior, covering: standard use cases, request timeout, s hared resolver/browser usage for multiple queries with the same name, filtering of invalid addresses, and various edge cases.
This commit adds `RxRaTracker::ScheduleAllTimers()`, which is called whenever there is a change in tracked information about routers and their advertised on-link or route prefixes. This method determines the next router expiration time (to initiate NS probes), the next prefix entry expiration, and the next stale time, then schedules all the timers. This centralizes all timer calculations and simplifies the code.
…10353) This commit updates `Srp::Client` to use sequential message IDs, replacing the previous model where message IDs were generated randomly. When processing responses from the server, older message IDs are accepted as long as the corresponding older message was identical to the latest one. This helps in situations where the server's response may be delayed (e.g., due to network congestion) and the client retry mechanism is retransmitting the same update message. This commit also adds a unit test `TestSrpClientDelayedResponse()` to validate the new behavior.
This commit adds `ReadAndSetNetworkDataTlv()` to `Mle::RxMessage` to read the Network Data TLV from a received MLE message and set it in `NetworkData::Leader`.
…#10361) This makes it easier for vendors to tweak scheduling CSL transmission request depending on minimum time to process it (which for example might be higher for RCP architecture). Signed-off-by: Maciej Baczmanski <[email protected]>
This commit improves the logging of `posix/platform/netif.cpp` in following ways: - Fix the false warning log when OT stack adds a unicast address. 1. When OT adds an address, it will add an address on host netif. 2. Then it causes a netlink `RTM_NEWADDR` event. 3. It assumes the newly added address is added by the host, so tries to add the unicast address to OT again by `otIp6AddUnicastAddress`. 4. `otIp6AddUnicastAddress` returns 'invalid arguments' error so it will log `Failed to process event...`. - Improve the logging of `AddRoute` and `DeleteRoute`. Previously they silently sent out the requests so we don't know what the allocated netlink sequence numbers were used for.
This commit updates the resetting of the Key Switch Guard Timer. It is now reset under two conditions: - The device itself triggers a key rotation and moves to the next key sequence after the rotation time has passed since the last switch. - The device receives a MAC or MLE message with an incoming key index matching the next key index. Regarding MLE messages, this rule is applied regardless of the message being classified as Authoritative or Peer.
…347) This commit removes the option to set `key_switch_guardtime` when constructing nodes and network topology in test scripts. The following tests are updated to reflect this change: - `Cert_5_8_02_KeyIncrement.py` - `Cert_5_8_03_KeyIncrementRollOver.py` - `Cert_6_6_01_KeyIncrement.py` - `Cert_6_6_02_KeyIncrementRollOver.py`
This commit adds an extra command `diag frame` to specify the frame used for `diag send` and `diag repeat`, so that we can use this command to send arbitrary 802.15.4 frames.
This commit adds `AppendLinkAndMleFrameCounterTlvs()` to `Mle::TxMessage` for appending both Link and MLE Frame Counter TLVs. This mirrors the existing `RxMessage` method for reading these counters.
This commit adds the `IsReachable()` helper method to `Router` class, which checks whether a router is considered reachable. It replaces the previous comparisons of `mNsProbeCount` in the code, improving readability. Neighbor Solicitation (NS) messages are used to determine reachability if the router has not been heard from for some time.
This commit modifies `Udp::Open()` to clear all properties of the passed-in `aSocket` using the `Clear()` method. This replaces the existing code, which only cleared the socket and peer address and port numbers. This change ensures that `void *mHandle` member variable in `otUdpSocket` is also set to `nullptr` before invoking platform UDP `otPlatUdpSocket()`.
This commit refactors methods that save or read a specified Dataset TLV in/from secure storage under `PLATFORM_KEY_REFERENCES`. These methods are moved from the `Dataset` class to the `DatasetManager` class, consolidating related functionality and aligning with the responsibilities of each class. The `Dataset` class is focused on appending/parsing TLVs, while the `DatasetManager` class is responsible for managing and saving the Active and Pending Datasets.
This commit adds the `Mle::GetLeaderRloc16()` method, which returns the RLOC16 of the Leader. This simplifies code that previously used `GetLeaderId()` followed by a conversion to RLOC16.
…s (#10384) This commit updates the code to use `RouterIdMatch()` for comparing the Router IDs of two given RLOC16 values. Additionally, it simplifies the `IsMinimalChild()` method.
This commit renames the methods for retrieving mesh local addresses to `GetMeshLocalRloc()` and `GetMeshLocalEid()` (from `GetMeshLocal16()` and `GetMeshLocal64()`, respectively) to align with the terminology used in the Thread specification. Member and local variables are also renamed accordingly.
Since 74c833b was introduced all IPv6 multicast packets are passed to the host. Previously used promiscuous mode configuration is now unused. This commit removes the dead code and corresponding elements as there is no use case for them at the moment (and they can confuse a user). Signed-off-by: Konrad Derda <[email protected]>
This commit enhances the generation of RLOC and ALOC addresses in the `Mle` class. Methods retrieving RLOC/ALOC addresses no longer return an `Error` and are now `void`. The previous check for a valid `GetRloc16()` value, which returned `kErrorDetach` if unset, is removed because this scenario only occurred before the device's initial attachment. Post-attachment, the RLOC16 remains valid even if the device is detached. This change simplifies the code since RLOC/ALOC address retrieval happens after the initial attachment. Additional enhancements include: - Changing the input parameter order in `GetCommissionerAloc()` to match `GetServiceAloc()`. - Using `Ip6::Address::SetToRoutingLocator()` to construct RLOC addresses, harmonizing address generation and improving code readability.
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.1 to 4.5.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@5ecb98a...e28ff12) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…(#10388) This commit adds `mIsReachable` to the `otBorderRoutingRouterEntry` structure to indicate whether a router is reachable. A router is marked unreachable after it fails to respond to multiple Neighbor Solicitation (NS) probes. Additionally, the `br` CLI commands are updated to display this information.
…0417) This commit removes the `MleRouter::GetNextHop()` method and instead directly uses `RouterTable::GetNextHop()`. This improves consistency across all modules.
… (#10418) This commit adds the `HasMinimalChild()` method to the `ChildTable` class and moves the logic for checking if a device has an MTD child with a given RLOC16 from the `MleRouter` class to `ChildTable`. This aligns better with the `ChildTable` class's responsibility of managing all children and providing methods to search and find child entries in the table.
This commit updates the `Child` class to use `Array<Ip6::Address>` to track the list of IPv6 addresses registered by an MTD child, simplifying the code.
This commit adds `IsRouterRloc16()` (replacing `IsActiveRouter()`), which checks whether a given RLOC16 refers to a router and not a child. The new name clarifies that it is only a check on the RLOC16 value and does not verify if the corresponding router ID is allocated and active. This commit also adds `IsChildRloc16()`, which is similar to `IsRouterRloc16()` and checks if the given RLOC16 is for a child. This simplifies the code and improves readability.
…(#10432) Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.7.0 to 2.8.1. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@63c24ba...17d0e2b) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit moves the `CheckReachability()` & `ResolveRoutingLoops()` methods from the `MleRouter` class to the `MeshForwarder` class now as `private` methods. This consolidates all `CheckReachability()` overloads within the `MeshForwarder` class.
This fixes a build error when the pre-processor define OPENTHREAD_POSIX_CONFIG_NETIF_PREFIX_ROUTE_METRIC is set: ``` /usr/src/ot-br-posix/third_party/openthread/repo/src/posix/platform/netif.cpp:486:26: error: ‘kLinkLocalScope’ does not name a type 486 | static constexpr kLinkLocalScope = 2; | ^~~~~~~~~~~~~~~ compilation terminated due to -Wfatal-errors. ```
This commit updates how messages with an ALOC destination are forwarded. If the chosen ALOC destination is a child, its parent is used as the mesh destination unless the device itself is the parent. Additionally, if the selected ALOC destination is a sleepy child of the device, the parent node ensures to prepare the message for indirect transmission. These changes ensure correct forwarding to ED or SED devices when they register a service and want to receive messages on their service ALOC. This commit also adds a new test, `test-030-anycast-forwarding.py`, which validates the forwarding to ALOC addresses on both ED and SED devices.
…ty flags (#10400)
…425) This commit modifies `Child::RemoveIp6Address()` to update the `mMlrToRegisterMask` and `mMlrToUnregisterMask` when a registered child IPv6 address entry is removed from the list. These bit-vector masks track the MLR state associated with the entry using its index in the array. Since `Array::Remove()` replaces the deleted entry with the last one in the array, the MLR masks are also updated to reflect this change.
This commit updates `HandleSetActiveOperationalDataset()` by removing the extra conversion from `Dataset` to `Dataset::Tlvs` and directly using the `Dataset` when saving the Active Operational Dataset.
…odules (#10434) This commit aims to make the use of RLOC16-related constants and methods consistent across different modules. - It replaces `Mac::kShortAddrInvalid` with `Mle::kInvalidRloc16` to refer to an invalid RLOC16 value (note that these constants use the same value `0xfffe`). - It uses `Get<Mle::Mle>().GetRloc16()` to retrieve the device's RLOC16 instead of `Get<Mac::Mac>().GetShortAddress()`. - It updates `AddressResolver` to consistently use `uint16_t` for RLOC16 (instead of the `Mac::ShortAddress` typedef).
This commit adds a diag command to rcp capbility diag module to check the max number of RCP supported sleepy children.
…ng (#10389) This commit enhances `RoutingManager::RxRaTracker`: - A new private `Evaluate()` method centralizes logic for handling changes in tracked routers and advertised prefixes. It removes expired entries, determines decision factors used by other `RoutingManager` components, and schedules timers. - A new class `DecisionFactors` is added to track factors used by `RoutingManager`, including the favored on-link prefix, presence of ULA/non-ULA prefixes, and M/O flags for mirroring in emitted RA messages. - `Evaluate()` determines these factors and signals changes using `HandleRaPrefixTableChanged()` only when necessary, simplifying signaling and avoiding redundant calculations.
This commit introduces several changes to the `Child` class for managing registered IPv6 addresses by MTD children: - A new method, `Child::GetIp6Addresses()`, is added, returning the `Array` of registered IPv6 address entries. This array includes all tracked child IPv6 addresses except for the mesh-local EID, which can be retrieved using `Child::GetMeshLocalIp6Address()`. - The simplified model enables easy iteration over the address array using `Array` range-based `for` loops. With this change, the complex `AddressIterator` and `AddressIteratorBuilder` nested classes are removed, streamlining the code. - MLR state tracking for child IPv6 address entries is simplified with the introduction of a new class, `Child::Ip6AddrEntry`, representing a registered IPv6 address entry. This class provides `GetMlrState()` and `SetMlrState()`, enforcing that the MLR state can only be set on a child IPv6 address entry.
This commit simplifies the appending and parsing of `NetworkNameTlv` using `Append<StringTlvType>()` and `Read<StringTlvType>()` TLV helper methods.
The SPI interface may receive the garbage bytes 0xff or 0x00 at the start of the received SPI frame. This commit skips the 0x00 bytes at the start of the received SPI frame.
…#10444) This commit updates `Dns::Client` so that when resolving a service using `kServiceModeSrvTxtOptimize`, it switches to single-question query mode and sends separate parallel SRV and TXT queries upon the first response timeout. This is in addition to the existing behavior of switching to separate queries upon receiving a response with an error rcode from the server. The `test_dns_client` unit test is also updated to validate this scenario. New `TestMode` configurations are added to server to control its behavior, allowing it to either reject multi-question queries (by sending a "FormatError" rcode) or ignore them (sending no response).
…#10439) This commit adds the `Tlv::ParseAndSkipTlv()` static method, which parses a TLV (regular or extended) in a message at a given offset. It validates that the TLV is fully contained within the message and updates the offset to skip over the entire parsed TLV. This helper method is used in various modules where manual iteration over a sequence of TLVs is performed, specifically to skip over extended TLVs. The following methods are updated to utilize this new method and perform additional TLV checks: - `DiscoverScanner::HandleDiscoveryResponse()` - `MleRouter::HandleDiscoveryRequest()` - `LinkMetrics::SubJect::AppendReport()` - `LinkMetrics::Subject::HandleManagementRequest()` - `LinkMetrics::Initiator::HandleReport()`
rlubos
approved these changes
Jun 27, 2024
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.
Looks good, but we're in a code freeze now so it needs to wait.
This was referenced Jul 19, 2024
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.
No description provided.