mbed-os/source/Common_Protocols/icmpv6.c

1667 lines
55 KiB
C
Raw Normal View History

/*
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
* Copyright (c) 2013-2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nsconfig.h"
#include "ns_types.h"
#include "string.h"
#include "ns_trace.h"
#include "randLIB.h"
#include "NWK_INTERFACE/Include/protocol.h"
#include "RPL/rpl_control.h"
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
#ifdef HAVE_RPL
#include "RPL/rpl_data.h"
#endif
#include "RPL/rpl_protocol.h"
#ifdef HAVE_MPL
#include "MPL/mpl.h"
#endif
#include "Common_Protocols/icmpv6.h"
#include "Common_Protocols/icmpv6_prefix.h"
#include "Common_Protocols/icmpv6_radv.h"
#include "Common_Protocols/ip.h"
#include "Common_Protocols/ipv6.h"
#include "Common_Protocols/mld.h"
#include "Core/include/socket.h"
#include "ipv6_stack/protocol_ipv6.h"
#include "ipv6_stack/ipv6_routing_table.h"
#include "ip_fsc.h"
#include "ipv6_stack/ipv6_routing_table.h"
#include "Service_Libs/nd_proxy/nd_proxy.h"
#include "NWK_INTERFACE/Include/protocol_stats.h"
#include "common_functions.h"
#include "6LoWPAN/ND/nd_router_object.h"
#include "6LoWPAN/Bootstraps/protocol_6lowpan.h"
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
#include "6LoWPAN/ws/ws_common_defines.h"
#include "6LoWPAN/ws/ws_common.h"
#define TRACE_GROUP "icmp"
static buffer_t *icmpv6_echo_request_handler(struct buffer *buf);
/* Check to see if a message is recognisable ICMPv6, and if so, fill in code/type */
/* This used ONLY for the e.1 + e.2 tests in RFC 4443, to try to avoid ICMPv6 error loops */
/* Packet may be ill-formed, because we are considering an ICMPv6 error response. */
static bool is_icmpv6_msg(buffer_t *buf)
{
const uint8_t *ptr = buffer_data_pointer(buf);
uint16_t len = buffer_data_length(buf);
/* IP header format:
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* |Version| Traffic Class | Flow Label |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Payload Length | Next Header | Hop Limit |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* + Source Address (16) + Destination Address (16), total 40
*/
if (len < IPV6_HDRLEN) {
return false;
}
uint16_t ip_len = common_read_16_bit(ptr + IPV6_HDROFF_PAYLOAD_LENGTH);
uint8_t nh = ptr[IPV6_HDROFF_NH];
ptr += IPV6_HDRLEN;
len -= IPV6_HDRLEN;
if (ip_len > len) {
return false;
}
len = ip_len;
while (len) {
uint16_t hdrlen;
switch (nh) {
case IPV6_NH_ICMPV6:
if (len < 4) {
return false;
}
buf->options.type = ptr[0];
buf->options.code = ptr[1];
return true;
case IPV6_NH_HOP_BY_HOP:
case IPV6_NH_DEST_OPT:
case IPV6_NH_ROUTING:
case IPV6_NH_MOBILITY:
case IPV6_NH_HIP:
case IPV6_NH_SHIM6:
if (len < 8) {
return false;
}
nh = ptr[0];
hdrlen = (ptr[1] + 1) * 8;
break;
case IPV6_NH_AUTH:
if (len < 8) {
return false;
}
nh = ptr[0];
hdrlen = (ptr[1] + 2) * 4;
break;
default:
return false;
}
if (hdrlen > len || (hdrlen & 7)) {
return false;
}
ptr += hdrlen;
len -= hdrlen;
}
return false;
}
buffer_t *icmpv6_error(buffer_t *buf, protocol_interface_info_entry_t *cur, uint8_t type, uint8_t code, uint32_t aux)
{
uint8_t *ptr;
/* Don't send ICMP errors to improperly-secured packets (they either reach MLE etc successfully, or we just drop) */
if (buf->options.ll_security_bypass_rx) {
return buffer_free(buf);
}
if (cur == NULL) {
cur = buf->interface;
}
/* Any ICMPv6 error in response to an UP packet implies an RX drop... */
if ((buf->info & B_DIR_MASK) == B_DIR_UP) {
protocol_stats_update(STATS_IP_RX_DROP, 1);
}
/* RFC 4443 processing rules e.1-2: don't send errors for ICMPv6 errors or redirects */
if (is_icmpv6_msg(buf) && (buf->options.type < 128 || buf->options.type == ICMPV6_TYPE_INFO_REDIRECT)) {
return buffer_free(buf);
}
/* RFC 4443 processing rules e.3-5: don't send errors for IP multicasts or link-layer multicasts+broadcasts (with exceptions) */
if (addr_is_ipv6_multicast(buf->dst_sa.address) || buf->options.ll_broadcast_rx || buf->options.ll_multicast_rx) {
if (!(type == ICMPV6_TYPE_ERROR_PACKET_TOO_BIG ||
(type == ICMPV6_TYPE_ERROR_PARAMETER_PROBLEM && code == ICMPV6_CODE_PARAM_PRB_UNREC_IPV6_OPT))) {
return buffer_free(buf);
}
}
/* RFC 4443 processing rule e.6 - source doesn't identify a single node */
if (addr_is_ipv6_unspecified(buf->src_sa.address) || addr_is_ipv6_multicast(buf->src_sa.address)) {
return buffer_free(buf);
}
if (addr_interface_address_compare(cur, buf->dst_sa.address) == 0) {
// RFC 4443 2.2 - if addressed to us, use that address as source
memswap(buf->dst_sa.address, buf->src_sa.address, 16);
} else {
// Otherwise we will use normal address selection rule
buf->dst_sa = buf->src_sa;
// This makes buffer_route choose the address
buf->src_sa.addr_type = ADDR_NONE;
}
buffer_turnaround(buf);
if (!ipv6_buffer_route(buf)) {
return buffer_free(buf);
}
cur = buf->interface;
/* Token-bucket rate limiting */
if (!cur->icmp_tokens) {
return buffer_free(buf);
}
cur->icmp_tokens--;
/* Include as much of the original packet as possible, without exceeding
* minimum MTU of 1280. */
uint16_t max_payload = ipv6_max_unfragmented_payload(buf, IPV6_MIN_LINK_MTU);
if (buffer_data_length(buf) > max_payload - 8) {
buffer_data_length_set(buf, max_payload - 8);
}
if ((buf = buffer_headroom(buf, 4)) == NULL) {
return NULL;
}
ptr = buffer_data_reserve_header(buf, 4);
ptr = common_write_32_bit(aux, ptr);
buf->options.traffic_class = 0;
buf->options.type = type;
buf->options.code = code;
buf->options.hop_limit = cur->cur_hop_limit;
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_ICMP | B_DIR_DOWN);
return (buf);
}
#ifndef NO_IPV6_PMTUD
/* Look at a (potentially-partial) packet that should be a copy of
* something we sent from an ICMP error. Identify final destination if we can.
*/
static bool icmpv6_identify_final_destination(buffer_t *buf, uint8_t *dest)
{
const uint8_t *ptr = buffer_data_pointer(buf);
/* Start with destination in IP header */
memcpy(dest, ptr + 24, 16);
#ifdef HAVE_RPL
/* Have to look for routing header */
uint8_t nh = ptr[6];
uint16_t hlen = 40;
uint16_t len = buffer_data_length(buf);
ptr += 40;
len -= 40;
for (;;) {
if (len < hlen) {
return false;
}
ptr += hlen;
len -= hlen;
/* Only need to process stuff we can send... */
switch (nh) {
case IPV6_NH_HOP_BY_HOP:
case IPV6_NH_DEST_OPT:
if (len < 2) {
return false;
}
hlen = (ptr[1] + 1) * 8;
nh = ptr[0];
break;
case IPV6_NH_ROUTING:
if (len < 4) {
return false;
}
/* If segments left is zero, IP dest is okay */
if (ptr[3] == 0) {
return true;
}
if (ptr[2] != IPV6_ROUTING_TYPE_RPL) {
return false;
}
hlen = (ptr[1] + 1) * 8;
if (len < hlen) {
return false;
}
return rpl_data_get_srh_last_address(ptr, dest);
case IPV6_NH_FRAGMENT:
case IPV6_NH_IPV6:
case IPV6_NH_ICMPV6:
case IPV6_NH_UDP:
case IPV6_NH_TCP:
/* If we've reached this header, it's too late for routing */
return true;
default:
/* Unrecognised header - can't have come from us... */
return false;
}
}
#else
return true;
#endif
}
buffer_t *icmpv6_packet_too_big_handler(buffer_t *buf)
{
tr_info("ICMP packet too big from: %s", trace_ipv6(buf->src_sa.address));
/* Need 4 for MTU, plus at least the IP header */
if (buffer_data_length(buf) < 4 + 40) {
return buffer_free(buf);
}
protocol_interface_info_entry_t *cur = buf->interface;
const uint8_t *ptr = buffer_data_pointer(buf);
uint32_t mtu = common_read_32_bit(ptr);
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 43c7ec2..82bbdcc 82bbdcc Merge branch 'release_internal' into release_external 7c7568d address error sent when matching entry found. (#1695) 0860ae7 Keep parent mle_entry in child_update_req timeout (#1693) 92044d6 Changed BBR router upgrade status (#1661) e4a9657 Compiler warning clean-up (#1690) a573bc4 Detection of duplicate address entries updated (#1686) f28cce8 pbbr route handling updated (#1681) 389fab0 MLE parent request timeout fixes (#1676) feb1784 Remove fragment/PMTU handling dropped by RFC 8200 073f7e8 entry keep alive flag set to true if entry already exists. (#1675) 1584759 Extra Thread-specific address check handling 934687b Tighten core "for us" check for unicast addresses 58a60e7 address query logic implemented(#1667) c25df78 Fix for Router advertisement process in REED (#1658) f8b227f Thread DHCP address allocation fix (#1657) 41ca387 removed the dependence of AE message relay on DUA prefix (#1655) 9e7e9e0 REED parser refactoring for MLE advertisement (#1654) 4fda90e Clear data request flag in child_id_req timeout (#1649) 5af4a39 updated mleid rloc sync in leader. (#1645) 564d3fe Added filter callback for MLE messages (#1638) 9f85599 Security bits handled correctly (#1642) 9e6c3a1 Update Thread MLE neighbor list cleanup, attempt #2 (#1640) 1060c34 file version checking handled after other errors. (#1641) 9c6b876 added nvm support for leader router id allocation. (#1626) 4f5e97d Revert "Update Thread MLE neighbor list cleanup (#1637)" (#1639) a20a0ba Update Thread MLE neighbor list cleanup (#1637) 32cfb6b Fix to partition selection rules (#1633) 0d655ed Update MLE receiver in Child ID req timeout error (#1634) 2378dad Discard late Child ID responses (#1630) 3e8b4ce Multicast registration time fix (#1631) f5530b1 Thread key ID change during attach (#1627) 1b7fdc0 Skip discovery request if MLE table is full (#1625) 4022ad9 Add new test API for clearing Thread stack values (#1624) ffb47a2 additional reed advertisement (#1609) cfb1e81 Thread tx failure handling update (#1620) 15846ed refactored network data sync as leader (#1615) a5c67fd data request resent if leader after resync does not receive data response.(#1614) f8a39da documentation fix: (#1608) b69ba04 Allow MLE entry forced saving to MAC (#1600) 0e85099 Update router id sequence number in router sync (#1594) f2cd4cf Read the short addr as 16-bit value before calling mac api (#1585) 912cf02 purge old partition data when child id response is received (#1588) 648ef89 Remove unnecessary call to mac (#1583) 09cff0e Fix uninitialised memory defect found by valgrind (#1582) a1acffc Update Thread publishing during address change (#1581) d2ddb1a Send new a/sd immediately after address change (#1576) c18d1fd added check for parent info before processing child update (#1577) 96e86b6 implemented Sleepy End Device child update requests. (#1570) 33cb7cb Flag check updated. (#1572) 9f8e7f2 Merge pull request #1566 from ARMmbed/ut_fix 565da92 Update socket_api_test.cpp 59545f9 Update socket_api_test.cpp 09414e1 ML-EID is now added to address registration tlv. (#1565) beddb01 unittest fix for newer release of cpputest git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 82bbdcc7ec63355fc19bf2c6054716584742b99b
2018-05-11 06:52:09 +00:00
/* RFC 8201 - ignore MTU smaller than minimum */
if (mtu < IPV6_MIN_LINK_MTU) {
return buffer_free(buf);
}
ptr = buffer_data_strip_header(buf, 4);
/* Check source is us */
if (addr_interface_address_compare(cur, ptr + 8)) {
return buffer_free(buf);
}
uint8_t final_dest[16];
if (!icmpv6_identify_final_destination(buf, final_dest)) {
return buffer_free(buf);
}
ipv6_destination_t *dest = ipv6_destination_lookup_or_create(final_dest, cur->id);
if (dest && mtu < dest->pmtu) {
tr_info("Reducing PMTU to %"PRIu32" for: %s", mtu, trace_ipv6(final_dest));
dest->pmtu = mtu;
dest->pmtu_lifetime = cur->pmtu_lifetime;
}
return buffer_free(buf);
}
#endif
static buffer_t *icmpv6_echo_request_handler(buffer_t *buf)
{
protocol_interface_info_entry_t *cur = buf->interface;
if (!cur) {
return buffer_free(buf);
}
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_ICMP | B_DIR_DOWN);
buf->options.type = ICMPV6_TYPE_INFO_ECHO_REPLY;
buf->options.code = 0x00;
buf->options.hop_limit = cur->cur_hop_limit;
if (addr_is_ipv6_multicast(buf->dst_sa.address)) {
const uint8_t *ipv6_ptr;
ipv6_ptr = addr_select_source(cur, buf->dst_sa.address, 0);
if (!ipv6_ptr) {
tr_debug("No address");
return buffer_free(buf);
}
memcpy(buf->dst_sa.address, buf->src_sa.address, 16);
memcpy(buf->src_sa.address, ipv6_ptr, 16);
} else {
memswap(buf->dst_sa.address, buf->src_sa.address, 16);
}
return buffer_turnaround(buf);
}
#ifdef HAVE_IPV6_ND
static void icmpv6_na_aro_handler(protocol_interface_info_entry_t *cur_interface, const uint8_t *dptr, const uint8_t *dst_addr)
{
(void)dst_addr;
dptr += 2;
uint16_t life_time;
uint8_t nd_status = *dptr;
dptr += 4;
life_time = common_read_16_bit(dptr);
dptr += 2;
if (memcmp(dptr, cur_interface->mac, 8) != 0) {
return;
}
/* Failure responses go to LL64, and they thus don't actually indicate the
* address that we were trying to register. So we have to rely on having
* "current DAD address" stored. We don't get it from the packet in any case.
*/
if (!cur_interface->if_6lowpan_dad_process.active) {
return;
}
if_address_entry_t *addr_entry = addr_get_entry(cur_interface, cur_interface->if_6lowpan_dad_process.address);
if (!addr_entry) {
return;
}
switch (nd_status) {
case ARO_SUCCESS:
addr_cb(cur_interface, addr_entry, ADDR_CALLBACK_DAD_COMPLETE);
if (addr_entry->cb) {
/* Lifetime is in minutes, state_timer in 1/10 s: a factor of 600 */
/* Set renewal to 75-85% of full lifetime by multiplying by [450..510] */
addr_entry->state_timer = life_time * randLIB_get_random_in_range(450, 510);
}
break;
case ARO_DUPLICATE:
addr_duplicate_detected(cur_interface, addr_entry->address);
break;
case ARO_FULL:
addr_cb(cur_interface, addr_entry, ADDR_CALLBACK_PARENT_FULL);
break;
}
}
/*
* Neighbor Solicitation Message Format
*
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Type | Code | Checksum |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Reserved |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | |
* + +
* | |
* + Target Address +
* | |
* + +
* | |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Options ...
* +-+-+-+-+-+-+-+-+-+-+-+-
*
*
* Source/Target Link-layer Address
*
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Type | Length | Link-Layer Address ...
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*/
static buffer_t *icmpv6_ns_handler(buffer_t *buf)
{
protocol_interface_info_entry_t *cur;
uint8_t target[16];
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
uint8_t dummy_sllao[16];
bool proxy = false;
const uint8_t *sllao;
const uint8_t *aro;
uint8_t *dptr = buffer_data_pointer(buf);
aro_t aro_out = { .present = false };
cur = buf->interface;
if (buf->options.code != 0 || buf->options.hop_limit != 255) {
goto drop;
}
if (!icmpv6_options_well_formed_in_buffer(buf, 20)) {
goto drop;
}
sllao = icmpv6_find_option_in_buffer(buf, 20, ICMPV6_OPT_SRC_LL_ADDR, 0);
/* If no SLLAO, ignore ARO (RFC 6775 6.5) */
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
/* This rule can be bypassed by setting flag "use_eui64_as_slla_in_aro" to true */
if (cur->ipv6_neighbour_cache.recv_addr_reg &&
(cur->ipv6_neighbour_cache.use_eui64_as_slla_in_aro || sllao)) {
aro = icmpv6_find_option_in_buffer(buf, 20, ICMPV6_OPT_ADDR_REGISTRATION, 0);
} else {
aro = NULL;
}
/* ARO's length must be 2 and status must be 0 */
if (aro && (aro[1] != 2 || aro[2] != 0)) {
goto drop;
}
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
/* If there was no SLLAO on ARO, use mac address to create dummy one... */
if (aro && !sllao && cur->ipv6_neighbour_cache.use_eui64_as_slla_in_aro) {
dummy_sllao[0] = ICMPV6_OPT_SRC_LL_ADDR; // Type
dummy_sllao[1] = 2; // Length = 2x8 bytes
memcpy(dummy_sllao + 2, aro + 8, 8); // EUI-64
memset(dummy_sllao + 10, 0, 6); // Padding
sllao = dummy_sllao;
}
// Skip the 4 reserved bytes
dptr += 4;
// Copy the target IPv6 address
memcpy(target, dptr, 16);
dptr += 16;
if (addr_is_ipv6_multicast(target)) {
goto drop;
}
if (addr_is_ipv6_unspecified(buf->src_sa.address)) {
/* Dest must be to solicited-node multicast, without source LL-addr */
if (sllao || memcmp(buf->dst_sa.address, ADDR_MULTICAST_SOLICITED, 13) != 0) {
goto drop;
}
/* If unspecified source, ignore ARO (RFC 6775 6.5) */
aro = NULL;
}
/* See RFC 4862 5.4.3 - hook for Duplicate Address Detection */
if (addr_is_tentative_for_interface(cur, target)) {
if (addr_is_ipv6_unspecified(buf->src_sa.address)) {
tr_debug("Received DAD NS for our tentative address");
/* Someone else is performing DAD */
addr_duplicate_detected(cur, target);
}
goto drop;
}
/* This first check's a bit dodgy - it responds to our address on the other
* interface, which we should only do in the whiteboard case.
*/
if (addr_interface_address_compare(cur, target) != 0) {
//tr_debug("Received NS for proxy %s", trace_ipv6(target));
proxy = true;
//Filter Link Local scope
if (addr_is_ipv6_link_local(target)) {
goto drop;
}
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 43c7ec2..82bbdcc 82bbdcc Merge branch 'release_internal' into release_external 7c7568d address error sent when matching entry found. (#1695) 0860ae7 Keep parent mle_entry in child_update_req timeout (#1693) 92044d6 Changed BBR router upgrade status (#1661) e4a9657 Compiler warning clean-up (#1690) a573bc4 Detection of duplicate address entries updated (#1686) f28cce8 pbbr route handling updated (#1681) 389fab0 MLE parent request timeout fixes (#1676) feb1784 Remove fragment/PMTU handling dropped by RFC 8200 073f7e8 entry keep alive flag set to true if entry already exists. (#1675) 1584759 Extra Thread-specific address check handling 934687b Tighten core "for us" check for unicast addresses 58a60e7 address query logic implemented(#1667) c25df78 Fix for Router advertisement process in REED (#1658) f8b227f Thread DHCP address allocation fix (#1657) 41ca387 removed the dependence of AE message relay on DUA prefix (#1655) 9e7e9e0 REED parser refactoring for MLE advertisement (#1654) 4fda90e Clear data request flag in child_id_req timeout (#1649) 5af4a39 updated mleid rloc sync in leader. (#1645) 564d3fe Added filter callback for MLE messages (#1638) 9f85599 Security bits handled correctly (#1642) 9e6c3a1 Update Thread MLE neighbor list cleanup, attempt #2 (#1640) 1060c34 file version checking handled after other errors. (#1641) 9c6b876 added nvm support for leader router id allocation. (#1626) 4f5e97d Revert "Update Thread MLE neighbor list cleanup (#1637)" (#1639) a20a0ba Update Thread MLE neighbor list cleanup (#1637) 32cfb6b Fix to partition selection rules (#1633) 0d655ed Update MLE receiver in Child ID req timeout error (#1634) 2378dad Discard late Child ID responses (#1630) 3e8b4ce Multicast registration time fix (#1631) f5530b1 Thread key ID change during attach (#1627) 1b7fdc0 Skip discovery request if MLE table is full (#1625) 4022ad9 Add new test API for clearing Thread stack values (#1624) ffb47a2 additional reed advertisement (#1609) cfb1e81 Thread tx failure handling update (#1620) 15846ed refactored network data sync as leader (#1615) a5c67fd data request resent if leader after resync does not receive data response.(#1614) f8a39da documentation fix: (#1608) b69ba04 Allow MLE entry forced saving to MAC (#1600) 0e85099 Update router id sequence number in router sync (#1594) f2cd4cf Read the short addr as 16-bit value before calling mac api (#1585) 912cf02 purge old partition data when child id response is received (#1588) 648ef89 Remove unnecessary call to mac (#1583) 09cff0e Fix uninitialised memory defect found by valgrind (#1582) a1acffc Update Thread publishing during address change (#1581) d2ddb1a Send new a/sd immediately after address change (#1576) c18d1fd added check for parent info before processing child update (#1577) 96e86b6 implemented Sleepy End Device child update requests. (#1570) 33cb7cb Flag check updated. (#1572) 9f8e7f2 Merge pull request #1566 from ARMmbed/ut_fix 565da92 Update socket_api_test.cpp 59545f9 Update socket_api_test.cpp 09414e1 ML-EID is now added to address registration tlv. (#1565) beddb01 unittest fix for newer release of cpputest git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 82bbdcc7ec63355fc19bf2c6054716584742b99b
2018-05-11 06:52:09 +00:00
if (!nd_proxy_enabled_for_downstream(cur->id) || !nd_proxy_target_address_validation(cur->id, target)) {
goto drop;
}
}
if (aro) {
/* If it had an ARO, and we're paying attention to it, possibilities:
* 1) No reply to NS now, we need to contact border router (false return)
* 2) Reply to NS now, with ARO (true return, aro_out.present true)
* 3) Reply to NS now, without ARO (true return, aro_out.present false)
*/
if (!nd_ns_aro_handler(cur, aro, sllao, buf->src_sa.address, &aro_out)) {
goto drop;
}
}
/* If we're returning an ARO, then we assume the ARO handler has done the
* necessary to the Neighbour Cache. Otherwise, normal RFC 4861 processing. */
if (!aro_out.present &&
sllao && cur->if_llao_parse(cur, sllao, &buf->dst_sa)) {
ipv6_neighbour_update_unsolicited(&cur->ipv6_neighbour_cache, buf->src_sa.address, buf->dst_sa.addr_type, buf->dst_sa.address);
}
buffer_t *na_buf = icmpv6_build_na(cur, true, !proxy, addr_is_ipv6_multicast(buf->dst_sa.address), target, aro_out.present ? &aro_out : NULL, buf->src_sa.address);
buffer_free(buf);
return na_buf;
drop:
buf = buffer_free(buf);
return buf;
}
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
int icmpv6_slaac_prefix_update(struct protocol_interface_info_entry *cur, const uint8_t *prefix_ptr, uint8_t prefix_len, uint32_t valid_lifetime, uint32_t preferred_lifetime)
{
int ret_val = -1;
//Validate first current list If prefix is already defined adress
ns_list_foreach_safe(if_address_entry_t, e, &cur->ip_addresses) {
if (e->source == ADDR_SOURCE_SLAAC && (e->prefix_len == prefix_len) && bitsequal(e->address, prefix_ptr, prefix_len)) {
//Update Current lifetimes (see RFC 4862 for rules detail)
if (valid_lifetime > (2 * 60 * 60) || valid_lifetime > e->valid_lifetime) {
addr_set_valid_lifetime(cur, e, valid_lifetime);
} else if (e->valid_lifetime <= (2 * 60 * 60)) {
//NOT Update Valid Lifetime
} else {
addr_set_valid_lifetime(cur, e, 2 * 60 * 60);
}
addr_set_preferred_lifetime(cur, e, preferred_lifetime);
ret_val = 0;
}
}
return ret_val;
}
void icmpv6_slaac_prefix_register_trig(struct protocol_interface_info_entry *cur, uint8_t *prefix_ptr, uint8_t prefix_len)
{
//Validate first current list If prefix is already defined adress
ns_list_foreach(if_address_entry_t, e, &cur->ip_addresses) {
if (e->source == ADDR_SOURCE_SLAAC && (e->prefix_len == prefix_len) && bitsequal(e->address, prefix_ptr, prefix_len)) {
e->state_timer = 150;
}
}
}
#endif // HAVE_IPV6_ND
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
if_address_entry_t *icmpv6_slaac_address_add(protocol_interface_info_entry_t *cur, const uint8_t *prefix_ptr, uint8_t prefix_len, uint32_t valid_lifetime, uint32_t preferred_lifetime, bool skip_dad, slaac_src_e slaac_src)
{
if_address_entry_t *address_entry;
uint8_t ipv6_address[16];
//define Autonomous address generation
if (prefix_len != 64) {
return NULL;
}
if (slaac_src == SLAAC_IID_DEFAULT && cur->opaque_slaac_iids && addr_opaque_iid_key_is_set()) {
slaac_src = SLAAC_IID_OPAQUE;
}
memcpy(ipv6_address, prefix_ptr, 8);
switch (slaac_src) {
case SLAAC_IID_DEFAULT:
case SLAAC_IID_FIXED:
memcpy(ipv6_address + 8, cur->iid_slaac, 8);
break;
case SLAAC_IID_EUI64:
memcpy(ipv6_address + 8, cur->iid_eui64, 8);
break;
case SLAAC_IID_OPAQUE:
addr_generate_opaque_iid(cur, ipv6_address);
break;
case SLAAC_IID_6LOWPAN_SHORT:
if (cur->nwk_id != IF_6LoWPAN || !cur->mac_parameters) {
return NULL;
}
memcpy(ipv6_address + 8, ADDR_SHORT_ADR_SUFFIC, 6);
common_write_16_bit(cur->lowpan_desired_short_address, ipv6_address + 14);
break;
default:
return NULL;
}
//tr_debug("Add add: %s", trace_ipv6(ipv6_address));
address_entry = addr_add(cur, ipv6_address, 64, ADDR_SOURCE_SLAAC, valid_lifetime, preferred_lifetime, skip_dad);
if (address_entry) {
address_entry->cb = NULL;
}
return address_entry;
}
#ifdef HAVE_IPV6_ND
static buffer_t *icmpv6_ra_handler(buffer_t *buf)
{
protocol_interface_info_entry_t *cur;
uint8_t flags, hoplimit;
uint32_t reachable_time, retrans_timer;
uint16_t data_len, router_lifetime;
uint8_t *dptr;
ipv6_neighbour_t *ncache_entry = NULL;
int_fast8_t preference = 0;
uint32_t longest_route_lifetime = 0;
if (!buf) {
return NULL;
}
cur = buf->interface;
// If both route and prefix receive are disabled do not process any RA options
if (!cur->recv_ra_routes && !cur->recv_ra_prefixes) {
return buffer_free(buf);
}
// Drop RA If LL address generation is not ready
if (addr_interface_get_ll_address(cur, NULL, 0) < 0) {
return buffer_free(buf);
}
if (cur->nwk_id == IF_6LoWPAN) {
// XXX this check needs to be for host bootstrap only
if ((cur->lowpan_info & INTERFACE_NWK_ROUTER_DEVICE) == 0) {
if (protocol_6lowpan_interface_compare_cordinator_netid(cur, &(buf->src_sa.address[8])) != 0) {
return buffer_free(buf);
}
}
}
if (!addr_is_ipv6_link_local(buf->src_sa.address) || buf->options.hop_limit != 255 || buf->options.code != 0) {
return buffer_free(buf);
}
if (!icmpv6_options_well_formed_in_buffer(buf, 12)) {
tr_debug("Malformed RA");
return buffer_free(buf);
}
/* Token-bucket rate limiting */
if (!cur->icmp_ra_tokens) {
return buffer_free(buf);
}
cur->icmp_ra_tokens--;
data_len = buffer_data_length(buf);
dptr = buffer_data_pointer(buf);
//tr_debug("RX RA: %s", trace_ipv6(buf->src_sa.address));
/* XXX we always set variables based on RAs; fine for a host,
* but wrong/iffy for a router. But then so is doing SLAAC as a
* router...
*/
hoplimit = *dptr++;
if (hoplimit) {
cur->cur_hop_limit = hoplimit;
}
//Read Flags
flags = *dptr++;
router_lifetime = common_read_16_bit(dptr);
dptr += 2;
reachable_time = common_read_32_bit(dptr);
dptr += 4;
if (reachable_time != 0 && reachable_time != cur->base_reachable_time) {
protocol_stack_interface_set_reachable_time(cur, reachable_time);
}
retrans_timer = common_read_32_bit(dptr);
dptr += 4;
if (retrans_timer != 0) {
cur->ipv6_neighbour_cache.retrans_timer = retrans_timer;
}
const uint8_t *mtu_option = icmpv6_find_option_in_buffer(buf, 12, ICMPV6_OPT_MTU, 1);
uint32_t mtu = mtu_option ? common_read_32_bit(mtu_option + 4) : 0;
sockaddr_t ll_addr = { .addr_type = ADDR_NONE };
const uint8_t *sllao = icmpv6_find_option_in_buffer(buf, 12, ICMPV6_OPT_SRC_LL_ADDR, 0);
if (sllao) {
if (cur->if_llao_parse(cur, sllao, &ll_addr)) {
ncache_entry = ipv6_neighbour_update_unsolicited(&cur->ipv6_neighbour_cache, buf->src_sa.address, ll_addr.addr_type, ll_addr.address);
}
}
buffer_data_strip_header(buf, 12);
data_len -= 12;
if (cur->nwk_id == IF_6LoWPAN) {
const uint8_t *abro;
bool uptodate;
/* ABRO processing - aiming to separate this from standard processing; only 6LRs need to use ABROs */
abro = icmpv6_find_option_in_buffer(buf, 0, ICMPV6_OPT_AUTHORITATIVE_BORDER_RTR, 3);
if (abro) {
uptodate = nd_ra_process_abro(cur, buf, abro + 2, flags, router_lifetime);
/* If ABRO processing indicated stale info, skip normal processing */
if (!uptodate) {
goto drop;
}
#ifndef NO_RADV_TX
if (hoplimit != 0) {
cur->adv_cur_hop_limit = hoplimit;
}
if (reachable_time != 0) {
cur->adv_reachable_time = reachable_time;
}
if (retrans_timer != 0) {
cur->adv_retrans_timer = retrans_timer;
}
if (mtu != 0) {
cur->adv_link_mtu = mtu;
}
#endif
}
}
if (cur->recv_ra_routes) {
if (router_lifetime) {
tr_debug("Possible Default Router");
switch (flags & RA_PRF_MASK) {
case RA_PRF_LOW:
preference = -1;
break;
case RA_PRF_HIGH:
preference = +1;
break;
default:
preference = 0;
break; // invalid is treated as 0
}
if (router_lifetime > longest_route_lifetime) {
longest_route_lifetime = router_lifetime;
}
}
ipv6_route_add(NULL, 0, cur->id, buf->src_sa.address, ROUTE_RADV, router_lifetime, preference);
}
if (mtu >= IPV6_MIN_LINK_MTU && mtu <= cur->max_link_mtu) {
cur->ipv6_neighbour_cache.link_mtu = mtu;
}
//Scan All options
while (data_len) {
uint8_t type = *dptr++;
uint16_t length = *dptr++ * 8;
if (type == ICMPV6_OPT_PREFIX_INFO && cur->recv_ra_prefixes && length == 32) {
uint8_t *ptr = dptr;
uint8_t prefix_length = *ptr++;
uint8_t prefix_flags = *ptr++;
uint32_t valid_lifetime = common_read_32_bit(ptr);
ptr += 4;
uint32_t preferred_lifetime = common_read_32_bit(ptr);
ptr += 8; //Update 32-bit time and reserved 32-bit
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
const uint8_t *prefix_ptr = ptr;
//Check is L Flag active
if (prefix_flags & PIO_L) {
//define ONLink Route Information
//tr_debug("Register On Link Prefix to routing table");
ipv6_route_add(prefix_ptr, prefix_length, cur->id, NULL, ROUTE_RADV, valid_lifetime, 0);
}
//Check if A-Flag
if (prefix_flags & PIO_A) {
if (icmpv6_slaac_prefix_update(cur, prefix_ptr, prefix_length, valid_lifetime, preferred_lifetime) != 0) {
ipv6_interface_slaac_handler(cur, prefix_ptr, prefix_length, valid_lifetime, preferred_lifetime);
}
//tr_debug("Prefix: %s", trace_ipv6(prefix_ptr));
}
// If the R flag is set and we have SLLAO, let's add a neighbour cache entry.
// This helps reduce RPL noise with source routing - may otherwise be good.
// Note that existence of a neighbour cache entry doesn't affect routing - we
// won't use it unless we otherwise decide they're on-link, eg from a source
// routing header directing to them
if ((prefix_flags & PIO_R) && ll_addr.addr_type != ADDR_NONE) {
ipv6_neighbour_update_unsolicited(&cur->ipv6_neighbour_cache, prefix_ptr, ll_addr.addr_type, ll_addr.address);
}
} else if (type == ICMPV6_OPT_ROUTE_INFO && cur->recv_ra_routes) {
uint8_t prefix_length = dptr[0];
uint8_t route_flags = dptr[1];
uint32_t route_lifetime = common_read_32_bit(dptr + 2);
uint8_t *prefix_ptr = dptr + 6;
// Check option is long enough for prefix
if (length < 8 + (prefix_length + 7u) / 8) {
goto next_option;
}
switch (route_flags & RA_PRF_MASK) {
case RA_PRF_LOW:
preference = -1;
break;
case RA_PRF_MEDIUM:
preference = 0;
break;
case RA_PRF_HIGH:
preference = +1;
break;
default:
goto next_option; // invalid not accepted
}
if (route_lifetime > longest_route_lifetime) {
longest_route_lifetime = route_lifetime;
}
//Call route Update
tr_info("Route: %s Lifetime: %lu Pref: %d", trace_ipv6_prefix(prefix_ptr, prefix_length), (unsigned long) route_lifetime, preference);
if (route_lifetime) {
ipv6_route_add(prefix_ptr, prefix_length, cur->id, buf->src_sa.address, ROUTE_RADV, route_lifetime, preference);
} else {
ipv6_route_delete(prefix_ptr, prefix_length, cur->id, buf->src_sa.address, ROUTE_RADV);
}
} else if (type == ICMPV6_OPT_6LOWPAN_CONTEXT) {
nd_ra_process_lowpan_context_option(cur, dptr - 2);
}
next_option:
//UPdate length and
data_len -= length;
dptr += length - 2;
}
/* RFC 4861 says to always set IsRouter on receipt of any RA, but this
* seems to make more sense - a shutting-down router (sending the final
* MAX_FINAL_RTR_ADVERTISEMENTS), or a router advertising only prefixes
* shouldn't really be marked as a router. So only set IsRouter if
* a route was advertised (with non-0 lifetime).
*/
if (longest_route_lifetime) {
if (!ncache_entry) {
ncache_entry = ipv6_neighbour_lookup(&cur->ipv6_neighbour_cache, buf->src_sa.address);
}
if (ncache_entry) {
ncache_entry->is_router = true;
}
}
drop:
return buffer_free(buf);
}
void icmpv6_recv_ra_routes(protocol_interface_info_entry_t *cur, bool enable)
{
if (cur->recv_ra_routes != enable) {
cur->recv_ra_routes = enable;
if (!enable) {
ipv6_route_table_remove_info(cur->id, ROUTE_RADV, NULL);
}
}
}
void icmpv6_recv_ra_prefixes(protocol_interface_info_entry_t *cur, bool enable)
{
if (cur->recv_ra_prefixes != enable) {
cur->recv_ra_prefixes = enable;
if (!enable) {
addr_set_non_preferred(cur, ADDR_SOURCE_SLAAC);
}
}
}
static buffer_t *icmpv6_redirect_handler(buffer_t *buf, protocol_interface_info_entry_t *cur)
{
const uint8_t *ptr = buffer_data_pointer(buf);
const uint8_t *tgt = ptr + 4;
const uint8_t *dest = ptr + 20;
sockaddr_t tgt_ll = { .addr_type = ADDR_NONE };
if (buf->options.hop_limit != 255) {
goto drop;
}
if (!addr_is_ipv6_link_local(buf->src_sa.address)) {
goto drop;
}
if (buf->options.code != 0) {
goto drop;
}
if (!icmpv6_options_well_formed_in_buffer(buf, 36)) {
goto drop;
}
if (addr_is_ipv6_multicast(dest)) {
goto drop;
}
const uint8_t *tllao = icmpv6_find_option_in_buffer(buf, 36, ICMPV6_OPT_TGT_LL_ADDR, 0);
if (tllao) {
cur->if_llao_parse(cur, tllao, &tgt_ll);
}
ipv6_destination_redirect(tgt, buf->src_sa.address, dest, buf->interface->id, tgt_ll.addr_type, tgt_ll.address);
return buffer_free(buf);
drop:
tr_warn("Redirect drop");
return buffer_free(buf);
}
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 43c7ec2..82bbdcc 82bbdcc Merge branch 'release_internal' into release_external 7c7568d address error sent when matching entry found. (#1695) 0860ae7 Keep parent mle_entry in child_update_req timeout (#1693) 92044d6 Changed BBR router upgrade status (#1661) e4a9657 Compiler warning clean-up (#1690) a573bc4 Detection of duplicate address entries updated (#1686) f28cce8 pbbr route handling updated (#1681) 389fab0 MLE parent request timeout fixes (#1676) feb1784 Remove fragment/PMTU handling dropped by RFC 8200 073f7e8 entry keep alive flag set to true if entry already exists. (#1675) 1584759 Extra Thread-specific address check handling 934687b Tighten core "for us" check for unicast addresses 58a60e7 address query logic implemented(#1667) c25df78 Fix for Router advertisement process in REED (#1658) f8b227f Thread DHCP address allocation fix (#1657) 41ca387 removed the dependence of AE message relay on DUA prefix (#1655) 9e7e9e0 REED parser refactoring for MLE advertisement (#1654) 4fda90e Clear data request flag in child_id_req timeout (#1649) 5af4a39 updated mleid rloc sync in leader. (#1645) 564d3fe Added filter callback for MLE messages (#1638) 9f85599 Security bits handled correctly (#1642) 9e6c3a1 Update Thread MLE neighbor list cleanup, attempt #2 (#1640) 1060c34 file version checking handled after other errors. (#1641) 9c6b876 added nvm support for leader router id allocation. (#1626) 4f5e97d Revert "Update Thread MLE neighbor list cleanup (#1637)" (#1639) a20a0ba Update Thread MLE neighbor list cleanup (#1637) 32cfb6b Fix to partition selection rules (#1633) 0d655ed Update MLE receiver in Child ID req timeout error (#1634) 2378dad Discard late Child ID responses (#1630) 3e8b4ce Multicast registration time fix (#1631) f5530b1 Thread key ID change during attach (#1627) 1b7fdc0 Skip discovery request if MLE table is full (#1625) 4022ad9 Add new test API for clearing Thread stack values (#1624) ffb47a2 additional reed advertisement (#1609) cfb1e81 Thread tx failure handling update (#1620) 15846ed refactored network data sync as leader (#1615) a5c67fd data request resent if leader after resync does not receive data response.(#1614) f8a39da documentation fix: (#1608) b69ba04 Allow MLE entry forced saving to MAC (#1600) 0e85099 Update router id sequence number in router sync (#1594) f2cd4cf Read the short addr as 16-bit value before calling mac api (#1585) 912cf02 purge old partition data when child id response is received (#1588) 648ef89 Remove unnecessary call to mac (#1583) 09cff0e Fix uninitialised memory defect found by valgrind (#1582) a1acffc Update Thread publishing during address change (#1581) d2ddb1a Send new a/sd immediately after address change (#1576) c18d1fd added check for parent info before processing child update (#1577) 96e86b6 implemented Sleepy End Device child update requests. (#1570) 33cb7cb Flag check updated. (#1572) 9f8e7f2 Merge pull request #1566 from ARMmbed/ut_fix 565da92 Update socket_api_test.cpp 59545f9 Update socket_api_test.cpp 09414e1 ML-EID is now added to address registration tlv. (#1565) beddb01 unittest fix for newer release of cpputest git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 82bbdcc7ec63355fc19bf2c6054716584742b99b
2018-05-11 06:52:09 +00:00
static buffer_t *icmpv6_na_handler(buffer_t *buf)
{
protocol_interface_info_entry_t *cur;
uint8_t *dptr = buffer_data_pointer(buf);
uint8_t flags;
const uint8_t *target;
const uint8_t *tllao;
if_address_entry_t *addr_entry;
ipv6_neighbour_t *neighbour_entry;
//"Parse NA at IPv6\n");
if (buf->options.code != 0 || buf->options.hop_limit != 255) {
goto drop;
}
if (!icmpv6_options_well_formed_in_buffer(buf, 20)) {
goto drop;
}
// Skip the 4 reserved bytes
flags = *dptr;
dptr += 4;
// Note the target IPv6 address
target = dptr;
if (addr_is_ipv6_multicast(target)) {
goto drop;
}
/* Solicited flag must be clear if sent to a multicast address */
if (addr_is_ipv6_multicast(buf->dst_sa.address) && (flags & NA_S)) {
goto drop;
}
cur = buf->interface;
/* RFC 4862 5.4.4 DAD checks */
addr_entry = addr_get_entry(cur, target);
if (addr_entry) {
if (addr_entry->tentative) {
tr_debug("Received NA for our tentative address");
addr_duplicate_detected(cur, target);
} else {
tr_debug("NA received for our own address: %s", trace_ipv6(target));
}
goto drop;
}
if (cur->ipv6_neighbour_cache.recv_na_aro) {
const uint8_t *aro = icmpv6_find_option_in_buffer(buf, 20, ICMPV6_OPT_ADDR_REGISTRATION, 2);
if (aro) {
icmpv6_na_aro_handler(cur, aro, buf->dst_sa.address);
}
}
/* No need to create a neighbour cache entry if one doesn't already exist */
neighbour_entry = ipv6_neighbour_lookup(&cur->ipv6_neighbour_cache, target);
if (!neighbour_entry) {
goto drop;
}
tllao = icmpv6_find_option_in_buffer(buf, 20, ICMPV6_OPT_TGT_LL_ADDR, 0);
if (!tllao || !cur->if_llao_parse(cur, tllao, &buf->dst_sa)) {
buf->dst_sa.addr_type = ADDR_NONE;
}
ipv6_neighbour_update_from_na(&cur->ipv6_neighbour_cache, neighbour_entry, flags, buf->dst_sa.addr_type, buf->dst_sa.address);
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
if (ws_info(cur) && neighbour_entry->state == IP_NEIGHBOUR_REACHABLE) {
tr_debug("NA neigh update");
ws_common_neighbor_update(cur, target);
}
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 43c7ec2..82bbdcc 82bbdcc Merge branch 'release_internal' into release_external 7c7568d address error sent when matching entry found. (#1695) 0860ae7 Keep parent mle_entry in child_update_req timeout (#1693) 92044d6 Changed BBR router upgrade status (#1661) e4a9657 Compiler warning clean-up (#1690) a573bc4 Detection of duplicate address entries updated (#1686) f28cce8 pbbr route handling updated (#1681) 389fab0 MLE parent request timeout fixes (#1676) feb1784 Remove fragment/PMTU handling dropped by RFC 8200 073f7e8 entry keep alive flag set to true if entry already exists. (#1675) 1584759 Extra Thread-specific address check handling 934687b Tighten core "for us" check for unicast addresses 58a60e7 address query logic implemented(#1667) c25df78 Fix for Router advertisement process in REED (#1658) f8b227f Thread DHCP address allocation fix (#1657) 41ca387 removed the dependence of AE message relay on DUA prefix (#1655) 9e7e9e0 REED parser refactoring for MLE advertisement (#1654) 4fda90e Clear data request flag in child_id_req timeout (#1649) 5af4a39 updated mleid rloc sync in leader. (#1645) 564d3fe Added filter callback for MLE messages (#1638) 9f85599 Security bits handled correctly (#1642) 9e6c3a1 Update Thread MLE neighbor list cleanup, attempt #2 (#1640) 1060c34 file version checking handled after other errors. (#1641) 9c6b876 added nvm support for leader router id allocation. (#1626) 4f5e97d Revert "Update Thread MLE neighbor list cleanup (#1637)" (#1639) a20a0ba Update Thread MLE neighbor list cleanup (#1637) 32cfb6b Fix to partition selection rules (#1633) 0d655ed Update MLE receiver in Child ID req timeout error (#1634) 2378dad Discard late Child ID responses (#1630) 3e8b4ce Multicast registration time fix (#1631) f5530b1 Thread key ID change during attach (#1627) 1b7fdc0 Skip discovery request if MLE table is full (#1625) 4022ad9 Add new test API for clearing Thread stack values (#1624) ffb47a2 additional reed advertisement (#1609) cfb1e81 Thread tx failure handling update (#1620) 15846ed refactored network data sync as leader (#1615) a5c67fd data request resent if leader after resync does not receive data response.(#1614) f8a39da documentation fix: (#1608) b69ba04 Allow MLE entry forced saving to MAC (#1600) 0e85099 Update router id sequence number in router sync (#1594) f2cd4cf Read the short addr as 16-bit value before calling mac api (#1585) 912cf02 purge old partition data when child id response is received (#1588) 648ef89 Remove unnecessary call to mac (#1583) 09cff0e Fix uninitialised memory defect found by valgrind (#1582) a1acffc Update Thread publishing during address change (#1581) d2ddb1a Send new a/sd immediately after address change (#1576) c18d1fd added check for parent info before processing child update (#1577) 96e86b6 implemented Sleepy End Device child update requests. (#1570) 33cb7cb Flag check updated. (#1572) 9f8e7f2 Merge pull request #1566 from ARMmbed/ut_fix 565da92 Update socket_api_test.cpp 59545f9 Update socket_api_test.cpp 09414e1 ML-EID is now added to address registration tlv. (#1565) beddb01 unittest fix for newer release of cpputest git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 82bbdcc7ec63355fc19bf2c6054716584742b99b
2018-05-11 06:52:09 +00:00
drop:
return buffer_free(buf);
}
#endif // HAVE_IPV6_ND
buffer_t *icmpv6_up(buffer_t *buf)
{
protocol_interface_info_entry_t *cur = NULL;
uint8_t *dptr = buffer_data_pointer(buf);
uint16_t data_len = buffer_data_length(buf);
cur = buf->interface;
if (buf->options.ll_security_bypass_rx) {
tr_debug("ICMP: Drop by EP");
goto drop;
}
if (data_len < 4) {
//tr_debug("Ic1");
goto drop;
}
buf->options.type = *dptr++;
buf->options.code = *dptr++;
/* Check FCS first */
if (buffer_ipv6_fcf(buf, IPV6_NH_ICMPV6)) {
tr_warn("ICMP cksum error!");
protocol_stats_update(STATS_IP_CKSUM_ERROR, 1);
goto drop;
}
//Skip ICMP Header Static 4 bytes length
buffer_data_strip_header(buf, 4);
if (cur->if_icmp_handler) {
bool bounce = false;
buf = cur->if_icmp_handler(cur, buf, &bounce);
if (!buf || bounce) {
return buf;
}
}
switch (buf->options.type) {
#ifdef HAVE_IPV6_ND
case ICMPV6_TYPE_INFO_RS:
buf = icmpv6_rs_handler(buf, cur);
break;
case ICMPV6_TYPE_INFO_RA:
buf = icmpv6_ra_handler(buf);
break;
case ICMPV6_TYPE_INFO_NS:
buf = icmpv6_ns_handler(buf);
break;
case ICMPV6_TYPE_INFO_NA:
buf = icmpv6_na_handler(buf);
break;
case ICMPV6_TYPE_INFO_REDIRECT:
buf = icmpv6_redirect_handler(buf, cur);
break;
#endif
case ICMPV6_TYPE_INFO_ECHO_REQUEST:
tr_debug("ICMP echo request from: %s", trace_ipv6(buf->src_sa.address));
buf = icmpv6_echo_request_handler(buf);
break;
case ICMPV6_TYPE_INFO_ECHO_REPLY:
ipv6_neighbour_reachability_confirmation(buf->src_sa.address, buf->interface->id);
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 43c7ec2..82bbdcc 82bbdcc Merge branch 'release_internal' into release_external 7c7568d address error sent when matching entry found. (#1695) 0860ae7 Keep parent mle_entry in child_update_req timeout (#1693) 92044d6 Changed BBR router upgrade status (#1661) e4a9657 Compiler warning clean-up (#1690) a573bc4 Detection of duplicate address entries updated (#1686) f28cce8 pbbr route handling updated (#1681) 389fab0 MLE parent request timeout fixes (#1676) feb1784 Remove fragment/PMTU handling dropped by RFC 8200 073f7e8 entry keep alive flag set to true if entry already exists. (#1675) 1584759 Extra Thread-specific address check handling 934687b Tighten core "for us" check for unicast addresses 58a60e7 address query logic implemented(#1667) c25df78 Fix for Router advertisement process in REED (#1658) f8b227f Thread DHCP address allocation fix (#1657) 41ca387 removed the dependence of AE message relay on DUA prefix (#1655) 9e7e9e0 REED parser refactoring for MLE advertisement (#1654) 4fda90e Clear data request flag in child_id_req timeout (#1649) 5af4a39 updated mleid rloc sync in leader. (#1645) 564d3fe Added filter callback for MLE messages (#1638) 9f85599 Security bits handled correctly (#1642) 9e6c3a1 Update Thread MLE neighbor list cleanup, attempt #2 (#1640) 1060c34 file version checking handled after other errors. (#1641) 9c6b876 added nvm support for leader router id allocation. (#1626) 4f5e97d Revert "Update Thread MLE neighbor list cleanup (#1637)" (#1639) a20a0ba Update Thread MLE neighbor list cleanup (#1637) 32cfb6b Fix to partition selection rules (#1633) 0d655ed Update MLE receiver in Child ID req timeout error (#1634) 2378dad Discard late Child ID responses (#1630) 3e8b4ce Multicast registration time fix (#1631) f5530b1 Thread key ID change during attach (#1627) 1b7fdc0 Skip discovery request if MLE table is full (#1625) 4022ad9 Add new test API for clearing Thread stack values (#1624) ffb47a2 additional reed advertisement (#1609) cfb1e81 Thread tx failure handling update (#1620) 15846ed refactored network data sync as leader (#1615) a5c67fd data request resent if leader after resync does not receive data response.(#1614) f8a39da documentation fix: (#1608) b69ba04 Allow MLE entry forced saving to MAC (#1600) 0e85099 Update router id sequence number in router sync (#1594) f2cd4cf Read the short addr as 16-bit value before calling mac api (#1585) 912cf02 purge old partition data when child id response is received (#1588) 648ef89 Remove unnecessary call to mac (#1583) 09cff0e Fix uninitialised memory defect found by valgrind (#1582) a1acffc Update Thread publishing during address change (#1581) d2ddb1a Send new a/sd immediately after address change (#1576) c18d1fd added check for parent info before processing child update (#1577) 96e86b6 implemented Sleepy End Device child update requests. (#1570) 33cb7cb Flag check updated. (#1572) 9f8e7f2 Merge pull request #1566 from ARMmbed/ut_fix 565da92 Update socket_api_test.cpp 59545f9 Update socket_api_test.cpp 09414e1 ML-EID is now added to address registration tlv. (#1565) beddb01 unittest fix for newer release of cpputest git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 82bbdcc7ec63355fc19bf2c6054716584742b99b
2018-05-11 06:52:09 +00:00
/* fall through */
case ICMPV6_TYPE_ERROR_DESTINATION_UNREACH:
#ifdef HAVE_RPL_ROOT
if (buf->options.type == ICMPV6_TYPE_ERROR_DESTINATION_UNREACH && buf->options.code == ICMPV6_CODE_DST_UNREACH_SRC_RTE_HDR_ERR) {
buf = rpl_control_source_route_error_handler(buf, cur);
}
#endif
/* no break */
default:
if (buf) {
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_APP | B_DIR_UP);
buf->options.type = (uint8_t) SOCKET_FAMILY_IPV6;
buf->options.code = IPV6_NH_ICMPV6;
buf->dst_sa.port = 0xffff;
/* Put back ICMP header */
buffer_data_reserve_header(buf, 4);
}
break;
case ICMPV6_TYPE_INFO_MCAST_LIST_REPORT:
buf = mld_report_handler(buf, cur);
break;
case ICMPV6_TYPE_INFO_MCAST_LIST_QUERY:
buf = mld_query_handler(buf, cur);
break;
#ifndef NO_IPV6_PMTUD
case ICMPV6_TYPE_ERROR_PACKET_TOO_BIG:
buf = icmpv6_packet_too_big_handler(buf);
break;
#endif
#ifdef HAVE_RPL
case ICMPV6_TYPE_INFO_RPL_CONTROL:
buf = rpl_control_handler(buf);
break;
#endif
#ifdef HAVE_MPL
case ICMPV6_TYPE_INFO_MPL_CONTROL:
buf = mpl_control_handler(buf, cur);
break;
#endif
#ifdef HAVE_6LOWPAN_BORDER_ROUTER
case ICMPV6_TYPE_INFO_DAR:
if (cur->nwk_id == IF_6LoWPAN) {
if (cur->bootsrap_mode == ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER) {
buf = nd_dar_parse(buf, cur);
break;
}
}
goto drop;
#endif
#ifdef HAVE_6LOWPAN_ROUTER
case ICMPV6_TYPE_INFO_DAC:
if (cur->nwk_id == IF_6LoWPAN) {
if (cur->lowpan_info & INTERFACE_NWK_BOOTSRAP_ADDRESS_REGISTER_READY) {
buf = nd_dac_handler(buf, cur);
break;
}
}
goto drop;
#endif
}
return buf;
drop:
return buffer_free(buf);
}
buffer_t *icmpv6_down(buffer_t *buf)
{
protocol_interface_info_entry_t *cur = buf->interface;
buf = buffer_headroom(buf, 4);
if (buf) {
uint8_t *dptr;
dptr = buffer_data_reserve_header(buf, 4);
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_IPV6 | B_DIR_DOWN);
if (buf->src_sa.addr_type != ADDR_IPV6) {
if (addr_interface_select_source(cur, buf->src_sa.address, buf->dst_sa.address, 0) != 0) {
tr_err("ICMP:InterFace Address Get Fail--> free Buffer");
return buffer_free(buf);
} else {
buf->src_sa.addr_type = ADDR_IPV6;
}
}
*dptr++ = buf->options.type;
*dptr++ = buf->options.code;
common_write_16_bit(0, dptr);
common_write_16_bit(buffer_ipv6_fcf(buf, IPV6_NH_ICMPV6), dptr);
buf->options.type = IPV6_NH_ICMPV6;
buf->options.code = 0;
buf->options.traffic_class &= ~IP_TCLASS_ECN_MASK;
}
return (buf);
}
#ifdef HAVE_IPV6_ND
buffer_t *icmpv6_build_rs(protocol_interface_info_entry_t *cur, const uint8_t *dest)
{
buffer_t *buf = buffer_get(127);
if (!buf) {
return NULL;
}
const uint8_t *src_address;
uint8_t *ptr = buffer_data_pointer(buf);
memcpy(buf->dst_sa.address, dest ? dest : ADDR_LINK_LOCAL_ALL_ROUTERS, 16);
buf->dst_sa.addr_type = ADDR_IPV6;
//select Address by Interface pointer and destination
src_address = addr_select_source(cur, buf->dst_sa.address, 0);
if (!src_address) {
tr_debug("No source address defined");
return buffer_free(buf);
}
memcpy(buf->src_sa.address, src_address, 16);
buf->src_sa.addr_type = ADDR_IPV6;
buf->options.type = ICMPV6_TYPE_INFO_RS;
buf->options.code = 0;
buf->options.hop_limit = 255;
ptr = common_write_32_bit(0, ptr);
/* RFC 6775 mandates SLLAO in RS */
ptr = icmpv6_write_icmp_lla(cur, ptr, ICMPV6_OPT_SRC_LL_ADDR, true, src_address);
buf->buf_end = ptr - buf->buf;
buf->interface = cur;
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_ICMP | B_DIR_DOWN);
return buf;
}
uint8_t *icmpv6_write_icmp_lla(protocol_interface_info_entry_t *cur, uint8_t *dptr, uint8_t icmp_opt, bool must, const uint8_t *ip_addr)
{
dptr += cur->if_llao_write(cur, dptr, icmp_opt, must, ip_addr);
return dptr;
}
/*
* Write either an ICMPv6 Prefix Information Option for a Router Advertisement
* (RFC4861+6275), or an RPL Prefix Information Option (RFC6550).
* Same payload, different type/len.
*/
uint8_t *icmpv6_write_prefix_option(const prefix_list_t *prefixes, uint8_t *dptr, uint8_t rpl_prefix, protocol_interface_info_entry_t *cur)
{
uint8_t flags;
ns_list_foreach(prefix_entry_t, prefix_ptr, prefixes) {
flags = prefix_ptr->options;
if (prefix_ptr->prefix_len == 64) {
/* XXX this seems dubious - shouldn't get_address_with_prefix be called every time? What if the address changes or is deleted? */
if (prefix_ptr->options & PIO_R) {
const uint8_t *addr = addr_select_with_prefix(cur, prefix_ptr->prefix, prefix_ptr->prefix_len, 0);
if (addr) {
memcpy(prefix_ptr->prefix, addr, 16);
} else {
flags &= ~PIO_R;
}
}
}
if (rpl_prefix) {
*dptr++ = RPL_PREFIX_INFO_OPTION;
*dptr++ = 30; // Length in bytes, excluding these 2
} else {
*dptr++ = ICMPV6_OPT_PREFIX_INFO;
*dptr++ = 4; // Length in 8-byte units
}
*dptr++ = prefix_ptr->prefix_len; //length
*dptr++ = flags; //Flags
dptr = common_write_32_bit(prefix_ptr->lifetime, dptr);
dptr = common_write_32_bit(prefix_ptr->preftime, dptr);
dptr = common_write_32_bit(0, dptr); // Reserved2
memcpy(dptr, prefix_ptr->prefix, 16);
dptr += 16;
}
return dptr;
}
/* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Type | Length | Reserved |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | MTU |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
uint8_t *icmpv6_write_mtu_option(uint32_t mtu, uint8_t *dptr)
{
*dptr++ = ICMPV6_OPT_MTU;
*dptr++ = 1; // length
dptr = common_write_16_bit(0, dptr);
dptr = common_write_32_bit(mtu, dptr);
return dptr;
}
buffer_t *icmpv6_build_ns(protocol_interface_info_entry_t *cur, const uint8_t target_addr[16], const uint8_t *prompting_src_addr, bool unicast, bool unspecified_source, const aro_t *aro)
{
if (!cur || addr_is_ipv6_multicast(target_addr)) {
return NULL;
}
buffer_t *buf = buffer_get(127);
if (!buf) {
return buf;
}
buf->options.type = ICMPV6_TYPE_INFO_NS;
buf->options.code = 0;
buf->options.hop_limit = 255;
uint8_t *ptr = buffer_data_pointer(buf);
ptr = common_write_32_bit(0, ptr);
memcpy(ptr, target_addr, 16);
ptr += 16;
if (aro) {
*ptr++ = ICMPV6_OPT_ADDR_REGISTRATION;
*ptr++ = 2;
*ptr++ = aro->status; /* Should be ARO_SUCCESS in an NS */
*ptr++ = 0;
ptr = common_write_16_bit(0, ptr);
ptr = common_write_16_bit(aro->lifetime, ptr);
memcpy(ptr, aro->eui64, 8);
ptr += 8;
}
if (unicast) {
memcpy(buf->dst_sa.address, target_addr, 16);
} else {
memcpy(buf->dst_sa.address, ADDR_MULTICAST_SOLICITED, 13);
memcpy(buf->dst_sa.address + 13, target_addr + 13, 3);
}
buf->dst_sa.addr_type = ADDR_IPV6;
if (unspecified_source) {
memset(buf->src_sa.address, 0, 16);
} else {
/* RFC 4861 7.2.2. says we should use the source of traffic prompting the NS, if possible */
/* This is also used to specify the address for ARO messages */
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
if (aro || (prompting_src_addr && addr_is_assigned_to_interface(cur, prompting_src_addr))) {
memcpy(buf->src_sa.address, prompting_src_addr, 16);
} else {
/* Otherwise, according to RFC 4861, we could use any address.
* But there is a 6LoWPAN/RPL hiccup - a node may have registered
* to us with an ARO, and we might send it's global address a NUD
* probe. But it doesn't know _our_ global address, which default
* address selection would favour.
* If it was still a host, we'd get away with using our global
* address, as we'd be its default route, so its reply comes to us.
* But if it's switched to being a RPL router, it would send its
* globally-addressed reply packet up the RPL DODAG.
* Avoid the problem by using link-local source.
* This will still leave us with an asymmetrical connection - its
* global address on-link for us, and we send to it directly (and
* can NUD probe it), whereas it regards us as off-link and will
* go via RPL (and won't probe us). But it will work fine.
*/
if (addr_interface_get_ll_address(cur, buf->src_sa.address, 0) < 0) {
tr_debug("No address for NS");
return buffer_free(buf);
}
}
/* SLLAO is required if we're sending an ARO */
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
/* This rule can be bypassed with flag use_eui64_as_slla_in_aro */
if (!cur->ipv6_neighbour_cache.use_eui64_as_slla_in_aro) {
ptr = icmpv6_write_icmp_lla(cur, ptr, ICMPV6_OPT_SRC_LL_ADDR, aro, buf->src_sa.address);
}
/* If ARO Success sending is omitted, MAC ACK is used instead */
/* Setting callback for receiving ACK from adaptation layer */
if (aro && cur->ipv6_neighbour_cache.omit_aro_success) {
buf->ack_receive_cb = rpl_control_address_register_done;
}
}
buf->src_sa.addr_type = ADDR_IPV6;
/* NS packets are implicitly on-link. If we ever find ourselves sending an
* NS to a global address, it's because we are in some way regarding
* it as on-link. (eg, redirect, RPL source routing header). We force
* transmission as on-link here, regardless of routing table, to avoid any
* potential oddities.
*/
ipv6_buffer_route_to(buf, buf->dst_sa.address, cur);
buffer_data_end_set(buf, ptr);
buf->interface = cur;
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_ICMP | B_DIR_DOWN);
return buf;
}
#endif // HAVE_IPV6_ND
void icmpv6_build_echo_req(protocol_interface_info_entry_t *cur, const uint8_t target_addr[16])
{
const uint8_t *src;
buffer_t *buf = buffer_get(127);
if (!buf) {
return;
}
buf->options.type = ICMPV6_TYPE_INFO_ECHO_REQUEST;
buf->options.code = 0;
buf->options.hop_limit = 255;
uint8_t *ptr = buffer_data_pointer(buf);
memcpy(ptr, target_addr, 16);
ptr += 16;
memcpy(buf->dst_sa.address, target_addr, 16);
buf->dst_sa.addr_type = ADDR_IPV6;
//Select Address By Destination
src = addr_select_source(cur, buf->dst_sa.address, 0);
if (src) {
memcpy(buf->src_sa.address, src, 16);
} else {
tr_debug("No address for NS");
buffer_free(buf);
return;
}
buf->src_sa.addr_type = ADDR_IPV6;
buffer_data_end_set(buf, ptr);
buf->interface = cur;
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_ICMP | B_DIR_DOWN);
protocol_push(buf);
}
#ifdef HAVE_6LOWPAN_ROUTER
buffer_t *icmpv6_build_dad(protocol_interface_info_entry_t *cur, buffer_t *buf, uint8_t type, const uint8_t dest_addr[16], const uint8_t eui64[8], const uint8_t reg_addr[16], uint8_t status, uint16_t lifetime)
{
if (!cur) {
return NULL;
}
if (!buf) {
buf = buffer_get(4 + 8 + 16);
if (!buf) {
return buf;
}
}
uint8_t *ptr = buffer_data_pointer(buf);
buf->options.type = type;
buf->options.code = 0;
buf->options.hop_limit = 64; /* RFC 6775 MULTIHOP_HOPLIMIT */
*ptr++ = status;
*ptr++ = 0;
ptr = common_write_16_bit(lifetime, ptr);
memcpy(ptr, eui64, 8);
ptr += 8;
memcpy(ptr, reg_addr, 16);
ptr += 16;
buffer_data_end_set(buf, ptr);
memcpy(buf->dst_sa.address, dest_addr, 16);
buf->dst_sa.addr_type = ADDR_IPV6;
const uint8_t *src = addr_select_source(cur, buf->dst_sa.address, 0);
if (src && !addr_is_ipv6_link_local(src)) {
memcpy(buf->src_sa.address, src, 16);
} else {
tr_debug("No address for DAD");
return buffer_free(buf);
}
buf->src_sa.addr_type = ADDR_IPV6;
buf->interface = cur;
buf->info = (buffer_info_t)(B_FROM_ICMP | B_TO_ICMP | B_DIR_DOWN);
return buf;
}
#endif // HAVE_6LOWPAN_ROUTER
#ifdef HAVE_IPV6_ND
/*
* Neighbor Advertisement Message Format
*
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Type | Code | Checksum |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* |R|S|O| Reserved |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | |
* + +
* | |
* + Target Address +
* | |
* + +
* | |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Options ...
* +-+-+-+-+-+-+-+-+-+-+-+-
*
* R Router flag.
* S Solicited flag.
* O Override flag.
*/
buffer_t *icmpv6_build_na(protocol_interface_info_entry_t *cur, bool solicited, bool override, bool tllao_required, const uint8_t target[static 16], const aro_t *aro, const uint8_t src_addr[static 16])
{
uint8_t *ptr;
uint8_t flags;
tr_debug("Build NA");
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea 4a188ea Merge branch 'release_internal' into release_external 27ba18e removed ws resources from nanostack. b693eae Merge pull request #1778 from ARMmbed/ws_bbr_update 543dd1e Renamed symbol to micro seconds. ab5d98a Added ND proxy support to ws border router f7c71c0 Remove new unittests from release external. ac55c15 Merge branch 'release_internal' into release_external f9b9e47 Fix GCC_ARM/ARM compiler warnings (#1777) 40efd39 Coverity tool reported error fix (#1776) b063457 Merge pull request #1775 from ARMmbed/mac_header_trace_fix b1fd538 Removed Debug trace support from common mac header class 90a36a6 coverity reported error fixes. (#1770) 9644114 Merge pull request #1774 from ARMmbed/debug_trace_fix 1e490f0 Removed debug trace which could be called at interrupt routine 1373a5f Clarify parameter name in phy_csma_params_t (#1773) 4a32a6c fixes for coverity tool reported issues. (#1772) 545d262 Update copyright year (#1771) 5ae07da address error handling fix. (#1769) 13c1ceb Clean multicast address when interface is shutdown 88bb7cc correct interface passed to address compare. (#1768) 53949a4 Thread device registers new address upon receipt of error notification. (#1767) 1653b06 replace ETX calculation for Wi-SUN 745c1dd refactor RPL dis sending 6e1cc58 Merge pull request #1764 from ARMmbed/mle_purge_fix 0b920d8 Fixed broken neighbor purge from list a6f3a0d Thread network data handling refactored (#1762) 87cc2c9 Merge pull request #1763 from ARMmbed/mle_fixs 944f9ca Fix broken MLE neigbor list write operation. 833e740 updated address error payload (#1761) 2565170 Add CBOR parsing to simpleenrolment message e38c70f fix duplicate address detection (#1760) 7648c1c Scope updated to three and prefix added to destination address. (#1758) 5612e08 DUA.ntf updates (#1752) 708bb3b pbbr stop removed to fix failing tests. (#1757) 1444c2f Add POC code for storing multicast address 684efef Fix MLR message handling b691b78 context id update (#1753) 5635089 fix key sequence issues when keys are rotated 74db027 fix for sleepy node poll. (#1750) 49adf2e Link entry for neighbour (#1749) 5bad8ee Correct MAC neighbour table sizes for Thread (#1748) 3858eb0 valgrind reported error: fixed uninitialised variables. (#1747) 24ef520 Update licenses in new WS files (#1745) 77dccdf valgrind tool reported error fix: (#1746) 9ac47a8 Adjust WS build configurations (#1744) c593e2b DUA.ntf to MTD child implemented (#1735) 3f5c6c1 Update missing SPDX identifiers to test files (#1743) 130fec4 Fix GCC_ARM linker error with some Thread builds (#1742) 65574a4 Merge pull request #1741 from ARMmbed/merge_koli_to_master 2dc41c0 Merge remote-tracking branch 'origin/koli' 2fc10b5 Put smarter dag max rank increment 2048. 0 affect a lot of troubles. d311040 RPL print update, nud and aneighbour update f9b23d4 Fix compiler warnings (#1740) 5a1f295 Merge pull request #1738 from ARMmbed/master_merge_to_koli abee481 Fix merge compile problems 2c77c37 Merge branch 'master' into koli 32fe4b8 Increase too small maximum root path length (#1737) 03bc696 Fix LLC unit test's 3702f57 LLC data indication and fhss channel set update 45905fa Update DHCP service memory allocation (#1734) 9c9b9e3 Fix crash which will happen if address registration fail and operation is triggered again by NULL pointer. cb83216 Enabled proper wi-sun security level 6. 7990fa9 Fix data for 6lowpan when mle is disabled. 501a612 Wi-sun trigle timer update: 47619c4 Function name code conventions fix. 1350bc5 mac_neighbor_info() macro defned for simplify code 41b84e4 Added check when weighting rule update must do network scan. 0215058 Fix ns_dyn_mem_init stub 33398ef Added Neighbor connected and trusted state update for wisun 24aa802 Integrate Mac neighbour table to Thread and 6Lowpan code 37c6342 Mac neighbour table update 7bb978e Thread Neighbor class update 26dd252 Removed almost duplicate mle entry discover for ll64 7a0aaa5 Rename some parameters which will help integration to new neighbor table. 3f905a1 Update nsdynmemLIB unit test stub (#1730) 2bd3e91 Return 0 instead of -1 on null pointer (#1728) fde5104 Function parameter and name refactor. e0f7dcf Updates to thread extension bootstrap (#1714) 13b3b05 Thread Neighbor and MLE API update 49ccb9d Removed threadNeighbour flag from mle_table_entry_t. e142eec Removed unused holdTime parameter from mle_table_entry. c8a99cb MLE service Update and integrate new features 726b08b Adjust NULL string tracing (#1726) 66636b8 Merge pull request #1724 from ARMmbed/IOTTHD-2537 2710836 Enable security to wi-sun with test security key. 8994bb2 MAC Security update c56886f MAC: Fixed frame length when calling FHSS TX conditions 4eb5567 CCM & AES update for support multiple user and context. 7544ef3 added response to confirmable unicast. (#1722) a8a5a90 duplicate address detection fix (#1720) 721c0b0 MLE service releases CCM library in error case (#1719) d0467a0 Fix stack overflow (#1718) 7ea9001 Added support for multiple registrations in one message 0a36af3 WS IE library update and LLC data confirmation update 4352709 MAC enhanced ACK RX and TX support 0b7f9fe Update Thread child id request timeout handling (#1715) 3e8df0a added neighbor advertisement sending after dad complete. (#1713) a46a363 updated multicast address registration timer (#1711) 7c6c482 Added target EID tlv to Dua response 2d3aff9 Delete parent mle-entry in case of parent lost or updated (#1707) b43db5f duplicate address handling (#1709) cb54705 Address generation changed to slaac based generation (#1708) ee0306b changed coap message type to non-confirmable. (#1706) 776e0e5 Merge pull request #1705 from ARMmbed/IOTTHD-2531 d92b2f9 Thread advertisement adjustment (#1703) f8d3d67 WS: Learn parent unicast dwell time bd88fa0 WS Lib: Fixed byte order of fixed channel 1f9162d Merge pull request #1704 from ARMmbed/IOTTHD-2484 2e15944 FHSS unit tests: Datarate storage removed e64bd19 FHSS: Implemented checking TX time 0ba4b9a Merge pull request #1700 from ARMmbed/IOTTHD-2483 1adb52b coap message type decided based on destination (#1702) d1cf42d multicast handling updated(#1701) 44110a1 Thread bootstrap improvements (#1699) 34c0df9 FHSS unit tests: fixed tests after TX slot update ddd7e92 FHSS: Calculate number of TX slots using defined slot length eaf35d2 Lowered Thread advertisement speedup threshold values (#1691) b67f2d8 Reset children when no response from parent (#1698) 3569c8a Mleid bbr fix (#1697) 1fc81fc Thread device learns weighting from advertisement (#1696) ba98835 Merge pull request #1689 from ARMmbed/IOTTHD-2475 28307de Randomize channel used in fixed channel 3412f4a WS bootstrap: Moved calculating and setting FHSS hop to own function 51a498b reset Dodag if global address is lost. c0e8cae Merge branch 'koli' into IOTTHD-2475 0ec37a6 Count the amount of configuration solicits c8f5c8d FHSS unit tests: Updated FHSS config tests. 490384f FHSS unit tests: Test TX/RX slots 4fdbc09 FHSS: Calculate hop count using RPL rank 8f194f8 FHSS: Implemented TX slot calculation b06b58a FHSS: Implemented setting hop count API d73d210 FHSS: Moved own hop to common FHSS structure caafff0 FHSS: Check TX slot for unicast frames 7406149 Merge pull request #1684 from ARMmbed/IOTTHD-2476 cc5f6d8 FHSS: validate received synch info. c48f0ef Merge pull request #1687 from ARMmbed/disable_channel_traces d5d1a13 Fixed trickle configuration for Discovery eef3bd7 FHSS: Disable FHSS channel debugs for WS fc74a31 Fixed unit test for support extensions. e803974 FHSS and Mac extension enable update. 4859f16 MAC RF extension enable e73e9b2 Merge pull request #1682 from ARMmbed/IOTTHD-2460 03f7105 fixed EAPOL parent selection cbdd2a9 Fixed set channel unit test ce1ab34 FHSS: Do not change channel during asynch transmissions c0456a3 Defined own structure to give CSMA backoff symbol time and cca mode. dff1e7d Merge pull request #1677 from ARMmbed/merge_MtoK 34dcbb6 Merge pull request #1674 from ARMmbed/IOTTHD-2443 3f9b34d Merge branch 'master' into koli f578c26 Updated border router configuration 1ce2385 RF PHY extension update 32db0cd FHSS: Learn FHSS configuration from parent PA config 5974344 Merge pull request #1670 from ARMmbed/IOTTHD-2449 82a8bca FHSS: support FHSS created by application 67f578a Calculated RSL from neighbours 4aa6890 Merge pull request #1664 from ARMmbed/IOTTHD-2442 65e2fad Fixed uninitialized parameter use at rpl instance allocate. 4767dd5 Merge pull request #1666 from ARMmbed/fhss_is_bc_flag_fix 6ffc81a FHSS unit tests: Fixed tests 14e1597 Fixed missing TX ime calculation for pre-builded MAC packet send. 03f447a FHSS: Do not use broadcast queue when fixed channel 40f3685 FHSS: do not push asynch messages in broadcast queue 45daec9 FHSS: FHSS is on BC channel by default 2dbc92c FHSS: Remove failed handle after successful transmission a152f45 Merge branch 'koli' into IOTTHD-2442 ea583c6 FHSS: Fixed updating broadcast synch c3aa7d1 Select correct parent based on network size and route cost 7bf3994 Fixed Code style warning. 2e1f32f Fixed WS_NESTED_IE information discover return length check. 445745a LLC Neighbor, Mac packet rebuild, mac timer update and phy Extension. 6cb78ff Distribute and learn network size bc4f46f Merge pull request #1656 from ARMmbed/IOTTHD-2441 7f94971 FHSS: Added random timeout before polling TX queue after channel change b6e40af Merge pull request #1653 from ARMmbed/IOTTHD-2366 b28fcaa FHSS unit tests: Test failed TX allocation fbe7795 Modified neighbour processing b2cff91 FHSS: Use channel retries with WS 9b11201 FHSS: Moved TX fail handler in FHSS common 9fff108 Merge pull request #1650 from ARMmbed/merge_MtoK2 04797c2 Detect border router connection lost 5227398 Merge branch 'master' into koli c0e8673 Merge pull request #1647 from ARMmbed/IOTTHD-2405 b7428e0 Merge pull request #1646 from ARMmbed/IOTTHD-2404 04449e8 FHSS unit tests: Test tx conditions and tx done callbacks baaec35 Merge pull request #1644 from ARMmbed/ws_start_bc 69c1483 FHSS: Added excluded channels in neighbor table 92acbd2 WS: fixed merge conflicts 4e01969 Merge branch 'koli' into ws_start_bc 97200b3 Added version number increase in border router 27c8b65 FHSS: unit test update 6eb1255 FHSS: WS bootstrap to start broadcast schedule 659a1c4 FHSS: Write BT-IE 64f31b1 Merge pull request #1635 from ARMmbed/IOTTHD-2217 7706f2e FHSS: Do not return to RX channel when configured fixed channel 908eb17 Change RPL dis destination address to RPL address 666dbbf FHSS: Start broadcast schedule only if device is border router 98f9991 FHSS: Set neighbor info get function 126275b Merge pull request #1632 from ARMmbed/IOTTHD-2402 7fa2c2b WS: Learn channel function from parent 3980870 WS: Enable FHSS in bootstrap ff72d95 Merge pull request #1629 from ARMmbed/cppcheck_fixes 85f1345 MAC: Check length pointer in ie vector length validate 672c4ef FHSS: Removed unnecessary fhss_api NULL e5637fd FHSS: Initialize next_channel in broadcast channel calculation cab9849 Send address registration to all PC parents (#1618) 5417936 Merge pull request #1623 from ARMmbed/mergeMtoK3 ad41972 Wait RPL to be ready before bootstrap is ready a314db0 Merge branch 'master' into koli f6ac06f Fhss ut improvements (#1622) 60a3b0f Fixed ETX update at LLC layer. bb152ce Merge pull request #1617 from ARMmbed/IOTTHD-2321 49c213a FHSS unit tests: Added more tx handle tests d5cc85a FHSS unit tests: Test removing parent info and get neighbor info 2d01008 FHSS unit tests: test setting parent BC info 681dedd Merge pull request #1613 from ARMmbed/IOTTHD-2320 7e59035 Fix broken unit test build. 6be455f WS ETX update 0efc062 ETX service update e5aba03 WS PAN advert validation update 802ce3e WS bootstrap update be296cd WS IE lib update cfa5fd9 FHSS: Store parent broadcast info pointer d0171be FHSS: Implemented get neighbor info and set/remove parent info callbacks 686ad9c Fix acynch --> asynch b4059b8 WS neighbor class integrated to use new FHSS structures c1b0d96 Merge pull request #1610 from ARMmbed/IOTTHD-2313 3d98860 FHSS: Implemented WS timing/schedule info structure f96db0c Merge pull request #1607 from ARMmbed/merge_MtoK 72bb71f Fixed missing params after merging master to koli d119df9 Merge branch 'master' into koli 8166585 Merge pull request #1602 from ARMmbed/IOTTHD-2311 90fbb45 Fixed LLC data unit test and add new functions to test 94e516f Integrated new WS IE header and payload API's c553e8c WS ie library read update 7db0938 fixed mac_mlme valgrind errors. 4e2a743 Fixed thread test some of. 2680dd6 Fixed unstable unit test verified by valgrind. 18eda56 Merge pull request #1605 from ARMmbed/fhss_ut_valgrind_fix eb96eae FHSS unit tests: fixed uninitialized varnings 27b7864 Fixed mac helper stub issues. a88590f FHSS unit tests: Test tr51cf with excluded channels 3c9356a FHSS unit tests: Updated channel function tests 3a562d3 FHSS: Added excluded channels in channel function interface b9606c9 FHSS: Static channel functions added 695e64c Merge pull request #1601 from ARMmbed/IOTTHD-2214 f973986 FHSS unit tests: Implemented FHSS common unit tests 2188af4 FHSS unit tests: Removed FHSS common functions from FHSS e6bac6a Rename and refactor structures and function names. b037628 Fixed unit test and stubs 8153fe3 Fixed Asynch request missing msdu_handle set at LLC. 1af46d8 WS bootstrap update c771df0 LLC update UTT / BT information to ws neighbor and refresh mac neighbor a43f6ad Mac helper API update: 14792db Ws neighbor hoping storage init integrated to interface init. ae7945d Wi-sun neighbor hopping infor storage API definition 8f5c0bf FHSS: Removed fhss_beacon, fhss_beacon_tasklet and fhss_mac_interface 1e94358 Fixed unitest build. 3b9a4b0 Base Integration for Mac neighbor table to WS 7729e20 Mac neighbor table integrate to interface structure 2c6f30a Addede NULL check some of mac neighbor table check. ed45fda Mac neighbor table unit test's. 0f85841 Added mac_neighbor_table stub's fc4c97b Generic mesh neighbor table class. 4b81978 Process advertisement solicit and process response (#1592) 73c6bc1 Merge pull request #1589 from ARMmbed/IOTTHD-2218 057b6ec Omit NA sending in ARO success cases. Use ACK instead. (#1587) 4686668 ws_management_api unit tests (#1591) 9ae6511 FHSS unit tests: Implemented FHSS WS tests 8147217 Added trickle for Advertisement and processing of response (#1586) c52b039 Merge pull request #1584 from ARMmbed/IOTTHD-2055 ac58048 FHSS: WS FHSS to use pre-set TX time feeee0f FHSS: Synch callback to write ufsi 3e8112b Merge pull request #1578 from ARMmbed/IOTTHD-2286 4cd6c49 Merge pull request #1579 from ARMmbed/fhss_bug_fix 296a2f1 FHSS: Fixed scramble table bug 80e4270 FHSS: Added vendor defined CF support 24f418c Merge pull request #1575 from ARMmbed/IOTTHD-2288 a849c8d FHSS unit tests: Update FHSS tests 83bd90e FHSS: fhss_struct defined static 04ae3c3 FHSS: separated is_bc_callback to FHSS and WS 59fe586 FHSS: removed allocation of scramble table 1ca1d0b FHSS: Continued fhss_structure cleaning 036e19c Api Updates to LLC, ws_ie_lib and ws_info 192007b Fixed MAC Asynch message send and header build bug. e0494b7 WS address registration callback for SLAAC (#1568) 93b7e32 FHSS: superframe handlers separated ff66ae9 FHSS: Separate FHSS and WS parameters - Configuration structs moved 6ace69b Merge pull request #1573 from ARMmbed/fhss_cleaning1 07d4089 FHSS: Cleaning. Static functions. Separated tx fail and retry callbacks 8b9d39b Merge pull request #1571 from ARMmbed/fhss_callback_update 316b007 FHSS: removed unnecessary state set handler db1ded0 WS LLC data service enabled to WS bootstrap. c326e4a Fixed MPX header size calculation to MPX data request. fa2d7d0 Removed Adaptation interface depency from LLC away. 4356ae8 separated BBR to own file (#1567) 75d93f8 Merge pull request #1564 from ARMmbed/IOTTHD-2213 19c4be6 FHSS: Separated tx done cb for FHSS and WS 3e326d1 FHSS: separated synch info write for FHSS and WS 15d4465 Function and parameter rename. 5af7992 Unit test for llc data service. ffb3639 Fixed stubs. 3f66f6a LLC delete added for test purpose b48cda0 Impelement LLC reset 47458c8 WS IE Lib unit test and fixed mac ie lib stub 6b6e509 MPX header module unit test. 55309e8 ws_llc_asynch_request() API update 5d9a379 Wisun spesific IE elemts write operation library. c718985 FHSS: Calculate destination slot and ufsi b4e1616 Merge pull request #1561 from ARMmbed/IOTTHD-2172 096aeef ws create interface and start rpl for poc (#1562) 77c851a FHSS: Added BSI in ws configuration 7d4a2f8 FHSS: Start broadcast schedule when bc intervals are known e55ec8a FHSS: Prevent changing unicast channel when broadcast is active b60b113 FHSS: Broadcast handler implemented 9bf1d1f WS Bootstrap skeleton (#1559) 3fb6390 Merge pull request #1560 from ARMmbed/mergeMtoK2 b78a370 Merge branch 'master' into koli 8b43c6e Merge pull request #1555 from ARMmbed/IOTTHD-2215 78314e8 FHSS: WS FHSS enable implemented d04b818 FHSS: Compensation callback to return timeout value 472becb FHSS: FHSS configuration to union b5f9e01 FHSS unit tests: Fixed after FHSS enable/down updates 2cbe6dc FHSS: Moved FHSS reset and down to FHSS module 4719187 FHSS: Separated FHSS enable functions for FHSS and WS FHSS f4548d8 FHSS: Implemented WS configuration structure 7ace04b Initial commit for ws_bootstrap (#1556) 9e46cf9 Added malformed message check to nested IE discovery. 7f4c184 Added support for write and discover Nested IE elements. e3d8150 SW MAC Asynch data request support 9a98177 Merge pull request #1552 from ARMmbed/cf_update 30075dd FHSS: TR51 channel function updated (bug in the spec?) 6b04d5a Merge pull request #1548 from ARMmbed/IOTTHD-2093 4249fad Integrated ws llc and mpx features. a49bf11 Fix Const pointer wrong use. 3e1972f WS LLC module implementation base 957f270 MPX frame support 93f0ed7 MAC ie library update: b2198b3 MPX support Integrate 2531c49 WS LLC and MAC MPX API definition and IE types definition. a5493d2 FHSS: Do not send TX failure if TX in progress in channel change 958991a FHSS: Few FHSS functions to static 7237796 Merge pull request #1545 from ARMmbed/IOTTHD-2097 f794990 FHSS: Implemented destination channel change in TX handle callback d2957a1 FHSS: fhss tx conditions callbacks added c1e7300 FHSS: hard coded channel function 1d54c7d FHSS: fhss tx handle callbacks added 0cc1889 FHSS: Moved external API set to fhss and fhss_ws c6cfb6c Merge pull request #1544 from ARMmbed/fhss_headers_refactored 1b4e203 FHSS: refactoring FHSS header files e047723 Merge pull request #1541 from ARMmbed/IOTTHD-2171 5d98e3e FHSS: Added support for TR51 channel function c8a9c7c FHSS: function to calculate nearest (larger or equal) prime number 5e70ec1 FHSS: ws struct to hold ws specific parameters f2d7558 FHSS unit tests: Fixed tests 149f17b FHSS: Own create api for WS e19de33 FHSS: WS to use Direct Hash channel function fb99776 FHSS: Some cleaning 7a21ca1 FHSS: Added common superframe handler a881580 FHSS: Added ws handler for FHSS state set f7ab36c FHSS: Created FHSS state set handler f6c61fc Added Copyrights c445590 MAC IE element library 6e94b08 MCPS-Data-REQ API update 38aedc5 Remove commented code away. 663fd3e Fixed missing doxygen tags. b9f7bf4 MAC functional updates and fix's: 2cef8ac Merge pull request #1538 from ARMmbed/mergeMtoK 321f700 Merge pull request #1534 from ARMmbed/IOTTHD-2047 146d7c4 Merge branch 'master' into koli 100db21 FHSS unit test: Added FHSS common to unit test makefile 37425ca FHSS: Separated common FHSS functions to own module 59b7b76 FHSS: Removed massive trace flags 60dfccb FHSS: Removed unnecessary channel functions e456662 FHSS: Removed scramble table generation from fhss enable b643622 Merge pull request #1532 from ARMmbed/IOTTHD-2049 b741f98 MCPS Data request API update. c329f61 MAC API update and internal update 55861f3 FHSS unit tests: Fixed tests after API change f9a31e9 FHSS API: Added callback to read synch info f94b2ab FHSS: FHSS to use synch info callback 6830fd3 FHSS API: Added synch info write callback ad5a1e1 Merge pull request #1527 from ARMmbed/IOTTHD-2095 3ed145f FHSS API: Added new configurations 0f9f0bb FHSS: Platform API to support multiple simultaneous timeouts bf65e9c Unit tests: Added PHY extension stub 322167e MAC: RX time get function implemented 23d3a58 MAC: Created a function to set TX time 2384c33 PHY API: extension to support timestamp 209e49a Merge pull request #1528 from ARMmbed/IOTTHD-2046 89a85a8 FHSS: Added copyright headers, comments etc. 5d0f44e Unit tests: DH1CF channel function tests implemented fbd5568 FHSS: DH1CF channel functions implemented cf03db2 FHSS: Implemented tr51 channel functions 00af7f1 Unit tests: Created channel function unit tests git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 4a188ea8231c0539eaf2b2859d89f2bcdcb47d8b
2018-08-08 13:51:52 +00:00
/* Check if ARO status == success, then sending can be omitted with flag */
if (aro && cur->ipv6_neighbour_cache.omit_aro_success && aro->status == ARO_SUCCESS) {
tr_debug("Omit success reply");
return NULL;
}
buffer_t *buf = buffer_get(8 + 16 + 16 + 16); /* fixed, target addr, target ll addr, aro */
if (!buf) {
return NULL;
}
ptr = buffer_data_pointer(buf);
buf->options.hop_limit = 255;
// Set the ICMPv6 NA type and code fields as per RFC4861
buf->options.type = ICMPV6_TYPE_INFO_NA;
buf->options.code = 0x00;
// If we're sending RAs, then we have to set the Router bit here
// (RFC 4861 makes host trigger action when they see the IsRouter flag
// go from true to false - RAs from us imply "IsRouter", apparently even if
// Router Lifetime is 0. So keep R set as long as we're sending RAs)
flags = icmpv6_radv_is_enabled(cur) ? NA_R : 0;
if (override) {
flags |= NA_O;
}
if (addr_is_ipv6_unspecified(src_addr)) {
// Solicited flag must be 0 if responding to DAD
memcpy(buf->dst_sa.address, ADDR_LINK_LOCAL_ALL_NODES, 16);
} else {
if (solicited) {
flags |= NA_S;
}
/* See RFC 6775 6.5.2 - errors are sent to LL64 address
* derived from EUI-64, success to IP source address */
if (aro && aro->status != ARO_SUCCESS) {
memcpy(buf->dst_sa.address, ADDR_LINK_LOCAL_PREFIX, 8);
memcpy(buf->dst_sa.address + 8, aro->eui64, 8);
buf->dst_sa.address[8] ^= 2;
} else {
memcpy(buf->dst_sa.address, src_addr, 16);
}
}
buf->dst_sa.addr_type = ADDR_IPV6;
/* In theory we could just use addr_select_source(), as RFC 4861 allows
* any address assigned to the interface as source. But RFC 6775 shows LL64
* as the source in its appendix, sending NA to a global address, and our
* lower layers go a bit funny with RPL during bootstrap if we send from a
* global address to a global address. By favouring the target address as
* source, we catch that 6LoWPAN case (the target is LL), as well as making
* it look neater anyway.
*/
if (addr_is_assigned_to_interface(cur, target)) {
memcpy(buf->src_sa.address, target, 16);
} else {
const uint8_t *src = addr_select_source(cur, buf->dst_sa.address, 0);
if (!src) {
tr_debug("No address");
return buffer_free(buf);
}
memcpy(buf->src_sa.address, src, 16);
}
buf->src_sa.addr_type = ADDR_IPV6;
ptr = common_write_32_bit((uint32_t) flags << 24, ptr);
// Set the target IPv6 address
memcpy(ptr, target, 16);
ptr += 16;
// Set the target Link-Layer address
ptr = icmpv6_write_icmp_lla(cur, ptr, ICMPV6_OPT_TGT_LL_ADDR, tllao_required, target);
if (aro) {
*ptr++ = ICMPV6_OPT_ADDR_REGISTRATION;
*ptr++ = 2;
*ptr++ = aro->status;
*ptr++ = 0;
ptr = common_write_16_bit(0, ptr);
ptr = common_write_16_bit(aro->lifetime, ptr);
memcpy(ptr, aro->eui64, 8);
ptr += 8;
}
//Force Next Hop is destination
ipv6_buffer_route_to(buf, buf->dst_sa.address, cur);
buffer_data_end_set(buf, ptr);
buf->info = (buffer_info_t)(B_DIR_DOWN | B_FROM_ICMP | B_TO_ICMP);
buf->interface = cur;
return (buf);
}
#endif // HAVE_IPV6_ND
#ifdef HAVE_IPV6_ND
/* Check whether the options section of an ICMPv6 message is well-formed */
bool icmpv6_options_well_formed(const uint8_t *dptr, uint_fast16_t dlen)
{
if (dlen % 8) {
return false;
}
while (dlen) {
uint_fast16_t opt_len = dptr[1] * 8;
if (opt_len == 0 || opt_len > dlen) {
return false;
}
dptr += opt_len;
dlen -= opt_len;
}
return true;
}
bool icmpv6_options_well_formed_in_buffer(const buffer_t *buf, uint16_t offset)
{
if (buffer_data_length(buf) < offset) {
return false;
}
return icmpv6_options_well_formed(buffer_data_pointer(buf) + offset,
buffer_data_length(buf) - offset);
}
/*
* Search for the first option of the specified type (and optionally length).
* Caller must have already checked the options are well-formed.
* If optlen is non-zero, then options with different lengths are ignored.
* Note that optlen is in 8-octet units.
*/
const uint8_t *icmpv6_find_option(const uint8_t *dptr, uint_fast16_t dlen, uint8_t option, uint8_t optlen)
{
while (dlen) {
uint8_t type = dptr[0];
uint8_t len = dptr[1];
if (type == option && (optlen == 0 || optlen == len)) {
return dptr;
} else {
dptr += len * 8;
dlen -= len * 8;
}
}
return NULL;
}
const uint8_t *icmpv6_find_option_in_buffer(const buffer_t *buf, uint_fast16_t offset, uint8_t option, uint8_t optlen)
{
return icmpv6_find_option(buffer_data_pointer(buf) + offset,
buffer_data_length(buf) - offset, option, optlen);
}
#endif // HAVE_IPV6_ND