[commissioner] synchronize the state with Border Agent#4788
Merged
jwhui merged 4 commits intoopenthread:masterfrom Apr 9, 2020
Merged
[commissioner] synchronize the state with Border Agent#4788jwhui merged 4 commits intoopenthread:masterfrom
jwhui merged 4 commits intoopenthread:masterfrom
Conversation
Size Report of OpenThread
|
Codecov Report
@@ Coverage Diff @@
## master #4788 +/- ##
=======================================
Coverage 75.33% 75.33%
=======================================
Files 324 324
Lines 40166 40177 +11
=======================================
+ Hits 30258 30269 +11
Misses 9908 9908
|
librasungirl
reviewed
Apr 4, 2020
ed47b54 to
ed8209e
Compare
librasungirl
approved these changes
Apr 4, 2020
bukepo
reviewed
Apr 7, 2020
bf88636 to
d3c1e47
Compare
jwhui
pushed a commit
that referenced
this pull request
Apr 9, 2020
jwhui
pushed a commit
that referenced
this pull request
Apr 9, 2020
This commit fixes situation when Commissioner can't be turned on or off, due to incorrect state of the Border Agent. In order to fix it: - a new COMMISSIONER state in the notifier module has been introduced - Border Agent API is not colled from the commissioner_api.cpp file
jwhui
pushed a commit
that referenced
this pull request
Apr 9, 2020
gjc13
pushed a commit
to gjc13/openthread
that referenced
this pull request
Aug 12, 2020
Issue(s): ot-sync-41 * origin/github/master: [ip6] disable security for link-local packets from unsecure ports (openthread#4782) [network-data] simplify ServiceTlv (openthread#4806) [joiner] align error logs with other modules (openthread#4788) [border-agent] remove the OT_CHANGED_BORDER_AGENT_STATE enumeration (openthread#4788) [commissioner] ensure synchronization with Border Agent (openthread#4788) [border-agent] use Notifier to update the state (openthread#4788) [cmake] add support for cc2652 (openthread#4691) [icmp] do not generate errors in response to errors (openthread#4800) [icmp] pass full error-causing message when sending error (openthread#4800) [mesh-forwarder] move frame-to-message conversion to separate method (openthread#4800) [mesh-forwarder] move ICMPv6 Dst Unreach call to mesh-forwarder (openthread#4800) [network-data] adopt const for methods, parameters, and local vars (openthread#4802) [mbedtls] leverage cmake provided by mbedtls (openthread#4803) [network-data-notifier] fix flag for child removed notification (openthread#4805) [harness-automation] fix case selection issue when using Chrome 80 (openthread#4648) [mle] add DeviceRole type, and IsChild, IsRouter, etc method (openthread#4794) [android] export CFLAGS and include directories (openthread#4797) [network-data] use GetLocator() when registering network data (openthread#4798) [network-data] implement network data notifier (openthread#4783) [github-actions] include fuzz checks (openthread#4792) [toranj] update test-039 to stagger initial address queries (openthread#4791) [coap] avoid div-by-0 error invalidating coap params (openthread#4787) [nrf528xx] add defines needed for compilation with IAR in nrf_security (openthread#4790) [address-resolver] ensure prev pointer stays valid on entry removal (openthread#4789) [network-data] simplify code, user helper methods (openthread#4780) [mesh-forwarder] fix bug in evicting from address resolver queue (openthread#4786) [jn5189] remove unused files [nrf528xx] update nrf security (openthread#4773) [network-data] add IncrementVersionAndStableVersion() (openthread#4781) [meshcop] generate PSKc from passphrase (openthread#4766) [core] use the common `RouterIdSet` class (openthread#4756) [network-data] periodically check for stale child ids (openthread#4779) [mesh-forwarder] include address resolving queue in message eviction (openthread#4776) [efr32] add nvm3 support (openthread#4521) [cmake] add support for cc1352 (openthread#4690) [toranj] add new test-case for cache table snoop (openthread#4600) [mac] remove disable CSMA-CA on the last transmit (openthread#4765) [toranj] update test-602-channel-select to add extra wait (openthread#4777) [gp712] align with the new otPlatFlash API (openthread#4774) [network-data] fix FindTlv() to return NULL when TLV sequence is malformed (openthread#4771) [simulation] enhance simulation for OTNS (openthread#4268) [github-actions] add `apt update` to each build (openthread#4772) [toranj] remove unused age property when parsing cache table (openthread#4599) [spinel/ncp] update address cache table property to include additional info (openthread#4599) [address-resolver] update public OT API for getting cache table (openthread#4599) [address-resolver] update how the cache table changes are logged (openthread#4599) [address-resolver] use linked-list and enable snooped entry timeout (openthread#4599) [linked-list] change PopAfter() parameter to be a pointer (openthread#4599) [docs] add lgtm.com status badge (openthread#4762) [ip6-address] add `SetMulticastNetworkPrefix()` for Prefix-Based Multicast Address (openthread#4757) [posix] fix mld process invalid arguments (openthread#4764) [cli] add `childip max` command (openthread#4759) [network-diagnostic] replace anonymous structs in netdiag.h (openthread#4760) [posix] add support for multicast group join (openthread#4687) [toranj] change start.sh to remove variable check to retry failed test (openthread#4761) [network-data] adding helper methods, simplify code (openthread#4743) [mesh-forwarder] do not remove router on link failures (openthread#4753) [meshcop] rename leader.cpp to meshcop_leader.cpp (openthread#4754) [bbr] (Un)Subscribe AllNetworkBBRs Multicast address (openthread#4755) [core] remove useless code for the old mLinkLocal16 (removed in openthread#913) (openthread#4750) [script] add build option to check-posix-pty (openthread#4748) Change-Id: I3a7df8f13a9bb3db060864cbef8d238ce4db7c07
sjlongland
pushed a commit
to vrtsystems/openthread
that referenced
this pull request
Dec 14, 2022
sjlongland
pushed a commit
to vrtsystems/openthread
that referenced
this pull request
Dec 14, 2022
sjlongland
pushed a commit
to vrtsystems/openthread
that referenced
this pull request
Dec 14, 2022
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
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.
This PR fixes the bug found during the Commissioning procedure when i wasn't able to turn on native commissioner even though the actual state was
Disabled.In case both Commissioner and Border Agent are compiled in, there is a chance that Commissioner will change the state without user intervention e.g. from
ActivetoDisabled(due to some network issue e.g. Keep Alives are lost) without calling the OpenThread API.If that happens, it may not be possible to turn on/off the commissioner again. There are a couple of possible problems but just to give perspective:
OT_ERROR_ALREADYwhich prevents to call theotCommisionerStartAPI https://github.com/openthread/openthread/blob/master/src/core/api/commissioner_api.cpp#L54Disabledin the background, the Border Agent may keep be turned off.otCommissionerStopAPI is called, the Border Agent may not be started, due to theOT_ERROR_INVALID_STATEerror.This PR introduces a few improvements:
To make architectural more cleaner:
Mleto Border Agent module (by using notifier).commissioner_api.cpp.OT_ERROR_ALREADYinstead ofOT_ERROR_INVALID_STATEwhen applicable in Commissioner API.To fix the above problem:
OT_ERROR_ALREADYerror.