-
Notifications
You must be signed in to change notification settings - Fork 17
openthread-br and matter-netman: pending-dataset migration, full NIM cluster data #53
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
Draft
LorbusChris
wants to merge
12
commits into
project-chip:main
Choose a base branch
from
LorbusChris:otbr-netifd-thread-proto
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
51dc527
openthread-br: update to the 2026.09.0 release
LorbusChris 1166d75
openthread-br: use the in-process nftables firewall backend
LorbusChris c325229
openthread-br: add ubus support for pending datasets
LorbusChris 989e782
openthread-br: align feature options with the openwrt packaging
LorbusChris cf2d8e6
openthread-br: report the router table and the neighbour frame counters
LorbusChris 687e0f0
matter-netman: update to connectedhomeip master of 2026-08-21
LorbusChris 3290b6b
matter-netman: support pending datasets in the ubus delegate
LorbusChris 4bb43c8
matter-netman: serve real data on all NIM clusters
LorbusChris 47d1697
matter-netman: drop the inert zap patch for access restrictions
LorbusChris 14dd1b7
matter-netman: report what the device knows and drop what it does not
LorbusChris 40497fe
matter-netman: retract the Thread network the border router has left
LorbusChris 7aece28
matter-netman: let the daemon follow interface changes itself
LorbusChris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| config matter 'settings' | ||
| # Share the LAN access point credentials over the Matter Wi-Fi | ||
| # Network Management cluster. Set to 0 to share nothing. | ||
| option wifi_share '1' | ||
| # The netifd network whose access point credentials are shared. | ||
| option wifi_network 'lan' | ||
| # Pin a specific wifi-iface section instead of the automatic choice. | ||
| # option wifi_iface 'default_radio0' | ||
| # The interface this device is reachable on. It is reported first in | ||
| # the network diagnostics, so a controller asking which interface the | ||
| # device uses gets this one, and it names the network the Ethernet | ||
| # diagnostics describe. | ||
| # option primary_interface 'br-lan' | ||
| # The manufacturer reported in Basic Information. Unset, the one the | ||
| # firmware states in /etc/os-release is used. | ||
| # option vendor_name 'CZ.NIC' | ||
| # The product reported in Basic Information. Unset, the distribution | ||
| # name from /etc/os-release is used, which is how a controller names | ||
| # the firmware rather than the board it runs on. | ||
| # option product_name 'Turris OS' | ||
| # Interface state and traffic counters are readable by every paired | ||
| # controller. Set to 0 to report none of them. | ||
| # option ethernet_diagnostics '1' | ||
| # Take the Ethernet diagnostics from this interface instead of the | ||
| # primary one, to report the state of a port rather than a bridge. | ||
| # option diagnostics_interface 'eth1' |
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
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
This file was deleted.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
service/matter-netman/patches/030-network-manager-fake-revert.patch
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| From 8eb63023e94bffaacfe608c97db0c141b8705196 Mon Sep 17 00:00:00 2001 | ||
| From: Christian Glombek <c.glombek@cosa.systems> | ||
| Date: Mon, 27 Jul 2026 07:34:19 +0200 | ||
| Subject: [PATCH] [network-manager] implement RevertActiveDataset in the fake | ||
| delegate | ||
|
|
||
| The fake border router returned NOT_IMPLEMENTED, so fail-safe rollback | ||
| could not be exercised without real hardware. | ||
|
|
||
| SetActiveDataset is only accepted when no dataset is configured, so | ||
| reverting means returning to the unconfigured state rather than restoring | ||
| a previous dataset. Clear it and report the timestamp change. | ||
|
|
||
| Assisted-By: Claude Opus 5 | ||
| --- | ||
| .../network-manager-app/linux/ThreadBRFake.h | 41 +++++++++++++++++-- | ||
| 1 file changed, 37 insertions(+), 4 deletions(-) | ||
|
|
||
| diff --git a/examples/network-manager-app/linux/ThreadBRFake.h b/examples/network-manager-app/linux/ThreadBRFake.h | ||
| index 86a92c7c54..453c78ebeb 100644 | ||
| --- a/examples/network-manager-app/linux/ThreadBRFake.h | ||
| +++ b/examples/network-manager-app/linux/ThreadBRFake.h | ||
| @@ -87,12 +87,44 @@ class FakeBorderRouterDelegate final : public app::Clusters::ThreadBorderRouterM | ||
|
|
||
| mActivateDatasetCallback = callback; | ||
| mActivateDatasetSequence = sequenceNum; | ||
| - TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(1000), ActivateActiveDataset, | ||
| - this); | ||
| + mActivationPending = true; | ||
| + VerifyOrReturn(DeviceLayer::SystemLayer() | ||
| + .StartTimer(System::Clock::Milliseconds32(1000), ActivateActiveDataset, this) | ||
| + .Handle([&](CHIP_ERROR error) { | ||
| + // Without the timer nothing would ever complete this activation; | ||
| + // undo the state so the next attempt is not refused as Busy. | ||
| + mActivateDatasetCallback = nullptr; | ||
| + mActivationPending = false; | ||
| + mActiveDataset.Clear(); | ||
| + callback->OnActivateDatasetComplete(sequenceNum, error); | ||
| + })); | ||
| } | ||
|
|
||
| - CHIP_ERROR CommitActiveDataset() override { return CHIP_NO_ERROR; } | ||
| - CHIP_ERROR RevertActiveDataset() override { return CHIP_ERROR_NOT_IMPLEMENTED; } | ||
| + CHIP_ERROR CommitActiveDataset() override | ||
| + { | ||
| + mActivationPending = false; | ||
| + return CHIP_NO_ERROR; | ||
| + } | ||
| + | ||
| + CHIP_ERROR RevertActiveDataset() override | ||
| + { | ||
| + // Parity with the ubus delegate: the fail-safe handler calls this for | ||
| + // every expiry, and only an activation that was not committed reverts. | ||
| + VerifyOrReturnError(mActivationPending, CHIP_NO_ERROR); | ||
| + mActivationPending = false; | ||
| + | ||
| + // The activation timer may still be armed. A reverted activation must | ||
| + // neither report success nor block the next attempt. | ||
| + DeviceLayer::SystemLayer().CancelTimer(ActivateActiveDataset, this); | ||
| + mActivateDatasetCallback = nullptr; | ||
| + | ||
| + // SetActiveDataset is only accepted when no dataset is configured, so | ||
| + // reverting it means returning to the unconfigured state. | ||
| + mActiveDataset.Clear(); | ||
| + mAttributeChangeCallback->ReportAttributeChanged( | ||
| + app::Clusters::ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::Id); | ||
| + return CHIP_NO_ERROR; | ||
| + } | ||
|
|
||
| CHIP_ERROR SetPendingDataset(const Thread::OperationalDataset & pendingDataset) override | ||
| { | ||
| @@ -130,6 +162,7 @@ private: | ||
|
|
||
| ActivateDatasetCallback * mActivateDatasetCallback = nullptr; | ||
| uint32_t mActivateDatasetSequence; | ||
| + bool mActivationPending = false; | ||
| }; | ||
|
|
||
| } // namespace chip |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.