Commit Graph

2855 Commits

Author SHA1 Message Date
Yakun Xu 8dcdc2cf31 [meshcop] border agent of native commissioner (#3535)
This commit enables a node serve as the border agent of native commissioner
by adding the border agent UDP port to unsecure port when the security
policy allows.

To fully test verify this commit, we need a native commissioner, which I
will submit a separate commit to enable that.
2019-01-31 08:48:27 -08:00
Jonathan Hui da12dca4d9 [cli] fix arg count checks in dataset command (#3533) 2019-01-30 08:47:53 -08:00
Jonathan Hui ba9709b674 [dtls] simplify dtls state machine (#3529)
This commit also adds checks to ensure there is only one outstanding
connection at a time.
2019-01-30 08:47:42 -08:00
Abtin Keshavarzian f9d757a161 [router-table] fix allocated router ids bit-vector size (#3534) 2019-01-29 19:09:25 -08:00
Abtin Keshavarzian 144270105d [router-table] add new methods to help iterate over router entries (#3527) 2019-01-29 12:12:56 -08:00
Abtin Keshavarzian e71bd6267e [test] fix PRETTY_FILES definition in unit test makefile (#3532)
The `test_string` source is also made "pretty".
2019-01-29 11:55:16 -08:00
Jonathan Hui 1c2e7033bf [cli] fix ping interval bounds check to avoid Timer::Start() assert (#3531) 2019-01-29 11:54:38 -08:00
Jonathan Hui 96076d3aa4 [coap] process Option Length = 0xf as a format error (#3530) 2019-01-29 08:55:59 -08:00
Jeff Bumgardner 3101ba7f0e [docs] Update README logo soup (#3528) 2019-01-29 08:54:50 -08:00
Yakun Xu 15d1603639 [build] clean up switches for POSIX platform (#3517) 2019-01-29 08:54:09 -08:00
Yakun Xu 504331eadd [mac] remove mDidTx from otRadioFrame (#3520)
mDidTx indicates whether a frame is received or transmitted, which is
only useful for capturing packets. This commit removes this field, and makes
this flag an argument to the pcap callback.
2019-01-28 12:31:15 -08:00
Yakun Xu 7789b90f23 [android] add missing OPENTHREAD_ENABLE_POSIX_APP (#3519) 2019-01-28 11:28:29 -08:00
Jiacheng Guo e893db15b5 [build] add platform udp build switch (#3450) 2019-01-28 10:43:34 -08:00
Yakun Xu 2146acbb18 [coap] make CoapBase::Send() private (#3526)
This commit makes `CoapBase::Send()` private so that only safe methods
are exposed, such as `SendMessage()`, `SendEmptyMessage()`, `SendAck()`.
2019-01-28 08:52:19 -08:00
rongli 47be103a62 [thci] update routerselectionjitter before start thread (#3524) 2019-01-28 08:41:14 -08:00
Jonathan Hui 251207d725 [cli] add lower bounds check to channel selection (#3523) 2019-01-28 08:39:18 -08:00
Jonathan Hui 70cb48f17a [ncp] resolve undefined shift in BorderRouterConfigToFlagByte (#3522) 2019-01-28 08:39:02 -08:00
Jonathan Hui f9659b3733 [router-table] add arg bounds check to Release() (#3521) 2019-01-28 08:38:42 -08:00
Jonathan Hui cb5e076a3e [cli] add length checks for "coaps set psk" (#3518) 2019-01-25 15:36:50 -08:00
Jonathan Hui cc26f1418e [network-data] resolve undefined shift in SetPreference() (#3503) 2019-01-25 15:10:26 -08:00
wgtdkp e341d02876 [meshcop] set message offset when sending JOIN_FIN.rsp (#3516) 2019-01-25 10:07:59 -08:00
Kamil Sroka eb4e460f9f [nordic] update nrfx to 1.6.0 (#3515) 2019-01-25 08:40:42 -08:00
Abtin Keshavarzian 6d0bce85a0 [thread-netif] change Up()/Down() to void (no return) (#3513) 2019-01-25 08:37:59 -08:00
Abtin Keshavarzian f13e35d5f7 [mesh-forwarder] change Start() and Stop() to be void (no error return) (#3509) 2019-01-25 08:36:30 -08:00
Jonathan Hui 249bc59874 [cli] add length check for "service add" (#3508) 2019-01-25 08:36:06 -08:00
Jonathan Hui 993f537a03 [cli] add ping interval bounds check to avoid Timer::Start() assert (#3507) 2019-01-25 08:35:44 -08:00
Jonathan Hui 560d9350b2 [emsk] set SETTINGS_CONFIG_PAGE_NUM = 2 (#3510) 2019-01-24 18:20:27 -08:00
Yakun Xu 5777e017ac [cli] refine CLI APIs (#3501) 2019-01-24 18:19:50 -08:00
Abtin Keshavarzian 0ac326ea57 [mac] update "out of band tx" to check current operation state (#3461)
This commit changes the `SendOutOfBandFrameRequest()` implementation
to check `mOperation` and `mPending<>` state variables to determine
if MAC layer is still busy with a previous OOB tx request (instead of
using the `mOobFrame` pointer variable). This change makes the OOB tx
implementation behave similarly to other APIs (e.g., `ActiveScan()`
or `SendFrameRequest()`). This commit also enhances the documentation
for the OOB Send APIs in header files.
2019-01-24 13:56:19 -08:00
Jonathan Hui b431bc34ce [network-data] avoid overflow in Service TLV length computation (#3506) 2019-01-24 09:06:36 -08:00
Jonathan Hui ce3c712fe6 [cli] validate prefix add/remove argument count (#3505) 2019-01-24 09:04:38 -08:00
Jonathan Hui c2a10ec446 [ip6] only allow external mcast addrs when iface is up (#3504) 2019-01-24 09:04:13 -08:00
Yakun Xu eeff2e225c [cli] move output format to server (#3502) 2019-01-24 09:02:23 -08:00
Jonathan Hui 65db853abc [nrf52840] fix build with DISABLE_BUILTIN_MBEDTLS=1 (#3497) 2019-01-24 09:01:11 -08:00
Jonathan Hui 4ca58d440d [cli-uart] save space for NULL terminator in rx buffer (#3500) 2019-01-23 21:50:56 -08:00
Jonathan Hui aa5673cd48 [cli] add bounds check on channel selection (#3499) 2019-01-23 21:50:38 -08:00
Yakun Xu 9094c12652 [code] add static assert (#3422) 2019-01-23 21:50:19 -08:00
Jonathan Hui a00c538830 [network-data] add prefix length checks (#3498) 2019-01-23 21:49:37 -08:00
Jeff Bumgardner 4bc819c307 [docs] Doxygen tag updates (#3496) 2019-01-23 14:28:40 -08:00
Jonathan Hui 0cc913b6b5 [network-data] add length checks to insert operations (#3495) 2019-01-23 10:16:48 -08:00
Yakun Xu 612d9de236 [posix] fix diagnostics for missing diag alarm (#3494)
This commit fixes a bug that `alarm.c` misses definition of
OPENTHREAD_ENABLE_DIAG for not including `openthread-core-config.h`.
This commit adds the `openthread-core-config.h` to every platform sources.

Also, this commit enhances the `test_diag.py` to make sure diag can send
packets out.
2019-01-23 08:49:27 -08:00
Jonathan Hui 2a14819996 [coap] return error if CoAP options exceeds message length (#3493) 2019-01-23 08:47:48 -08:00
Jonathan Hui 0c487ef140 [mle] do not add ip6 addrs in disabled state (#3492) 2019-01-23 08:47:31 -08:00
Yakun Xu d8c17ceef2 [posix-app] expose mainloop APIs (#3490) 2019-01-23 08:46:33 -08:00
Abtin Keshavarzian dde12296e5 [mac-frame] change const methods to return pointers to const (#3481)
This commit changes the `const` methods in `Mac::Frame` class
returning a pointer type to return a pointer to `const`. It also
changes the implementation of non-`const` methods (e.g., `GetPayload()`
and `GetFooter()`) to re-use the corresponding `const` methods.
2019-01-23 08:43:30 -08:00
Yakun Xu 3fabc4660c [slaac] handle slaac internally (#3484) 2019-01-22 23:34:26 -08:00
Yakun Xu 26c5d0ecb8 [border-agent] reuse Dtls restart (#3489)
`MeshCoP::Dtls` session will restart listening by itself. It's not
necessary for border agent to restart `MeshCoP::Dtls`.
2019-01-22 16:11:07 -08:00
Yakun Xu fe3d910853 [doc] add missing doc for datatset (#3487) 2019-01-22 16:08:33 -08:00
Robert Lubos 9cb48245e5 [cli] fix GetOwner function for console cli backend (#3486)
Current implementation of GetOwner function for single-instance CLI
assumed that `cli_uart` backend is used. This caused application
crash when different backend was used and `cli_uart` was not
initialized (and in result sUartServer static pointer was not set).

This commit fixes the issue by moving static CLI Server pointer and
the mInterpreter field to the to the base Server class and providing
getter method to obtain the Interpreter instance. With this approach,
any backend derived from the Server class will be able to initialize
the static pointer and will provide a valid reference to the
Interpreter class instance.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-22 16:07:46 -08:00
Yakun Xu b1686c61f4 [slaac] only create a single address for a prefix (#3485)
This commit changes the SLAAC policy so that if there is an existing address
with of a prefix, no new address will be created for this SLAAC enabled
prefix.
2019-01-22 09:15:02 -08:00