Skip to content

Commit b6e5a0a

Browse files
authored
Merge pull request #11524 from ARMmbed/release-candidate
Release candidate 3 for Mbed OS 5.14
2 parents f60e9a8 + 23e61c0 commit b6e5a0a

File tree

67 files changed

+2880
-2070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2880
-2070
lines changed

features/cellular/framework/device/CellularStateMachine.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ bool CellularStateMachine::open_sim()
165165
bool sim_ready = state == CellularDevice::SimStateReady;
166166

167167
if (sim_ready) {
168+
#ifdef MBED_CONF_CELLULAR_CLEAR_ON_CONNECT
169+
if (_cellularDevice.clear() != NSAPI_ERROR_OK) {
170+
tr_warning("CellularDevice clear failed");
171+
return false;
172+
}
173+
#endif
168174
_cb_data.error = _network.set_registration(_plmn);
169175
tr_debug("STM: set_registration: %d, plmn: %s", _cb_data.error, _plmn ? _plmn : "NULL");
170176
if (_cb_data.error) {
@@ -395,7 +401,6 @@ void CellularStateMachine::state_sim_pin()
395401
retry_state_or_fail();
396402
return;
397403
}
398-
399404
if (_network.is_active_context()) { // check if context was already activated
400405
tr_debug("Active context found.");
401406
_status |= ACTIVE_PDP_CONTEXT;

features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ nsapi_error_t UBLOX_AT::init()
117117
}
118118
#endif
119119

120-
return err;
120+
return _at->unlock_return_error();
121121
}
122122

123123
nsapi_error_t UBLOX_AT::config_authentication_parameters()

features/frameworks/mbed-coap/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
## [v5.1.1](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.1)
4+
5+
- Delay the random initialization of message id to a later phase and not during init() so there is enough time
6+
for system to complete the rest of the initialization.
7+
8+
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v5.1.0...v5.1.1)
9+
10+
311
## [v5.1.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.0)
412

513
- Introduce SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT configuration flag.

features/frameworks/mbed-coap/source/sn_coap_protocol.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,7 @@ struct coap_s *sn_coap_protocol_init(void *(*used_malloc_func_ptr)(uint16_t), vo
179179

180180
#endif /* ENABLE_RESENDINGS */
181181

182-
/* Randomize global message ID */
183-
randLIB_seed_random();
184-
message_id = randLIB_get_16bit();
185-
if (message_id == 0) {
186-
message_id = 1;
187-
}
188-
182+
message_id = 0;
189183
return handle;
190184
}
191185

@@ -2523,6 +2517,11 @@ static bool compare_address_and_port(const sn_nsdl_addr_s* left, const sn_nsdl_a
25232517

25242518
static uint16_t get_new_message_id(void)
25252519
{
2520+
if (message_id == 0) {
2521+
/* Randomize global message ID */
2522+
randLIB_seed_random();
2523+
message_id = randLIB_get_16bit();
2524+
}
25262525
message_id++;
25272526
if (message_id == 0) {
25282527
message_id = 1;

features/mbedtls/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mbedtls-2.19.0
1+
mbedtls-2.19.1

features/mbedtls/importer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#
2828

2929
# Set the mbed TLS release to import (this can/should be edited before import)
30-
MBED_TLS_RELEASE ?= mbedtls-2.19.0
30+
MBED_TLS_RELEASE ?= mbedtls-2.19.1
3131
MBED_TLS_REPO_URL ?= [email protected]:ARMmbed/mbedtls-restricted.git
3232

3333
# Translate between mbed TLS namespace and mbed namespace

features/mbedtls/inc/mbedtls/check_config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@
305305
#error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
306306
#endif
307307

308+
#if defined(MBEDTLS_MEMORY_BACKTRACE) && !defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
309+
#error "MBEDTLS_MEMORY_BACKTRACE defined, but not all prerequesites"
310+
#endif
311+
312+
#if defined(MBEDTLS_MEMORY_DEBUG) && !defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
313+
#error "MBEDTLS_MEMORY_DEBUG defined, but not all prerequesites"
314+
#endif
315+
308316
#if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM)
309317
#error "MBEDTLS_PADLOCK_C defined, but not all prerequisites"
310318
#endif

features/mbedtls/inc/mbedtls/ssl.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,8 @@ struct mbedtls_ssl_config
970970
* tls_prf and random bytes. Should replace f_export_keys */
971971
int (*f_export_keys_ext)( void *, const unsigned char *,
972972
const unsigned char *, size_t, size_t, size_t,
973-
unsigned char[32], unsigned char[32], mbedtls_tls_prf_types );
973+
const unsigned char[32], const unsigned char[32],
974+
mbedtls_tls_prf_types );
974975
void *p_export_keys; /*!< context for key export callback */
975976
#endif
976977

@@ -1925,8 +1926,8 @@ typedef int mbedtls_ssl_export_keys_ext_t( void *p_expkey,
19251926
size_t maclen,
19261927
size_t keylen,
19271928
size_t ivlen,
1928-
unsigned char client_random[32],
1929-
unsigned char server_random[32],
1929+
const unsigned char client_random[32],
1930+
const unsigned char server_random[32],
19301931
mbedtls_tls_prf_types tls_prf_type );
19311932
#endif /* MBEDTLS_SSL_EXPORT_KEYS */
19321933

features/mbedtls/src/ssl_tls.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,9 +1427,8 @@ static int ssl_populate_transform( mbedtls_ssl_transform *transform,
14271427
master, keyblk,
14281428
mac_key_len, keylen,
14291429
iv_copy_len,
1430-
/* work around bug in exporter type */
1431-
(unsigned char *) randbytes + 32,
1432-
(unsigned char *) randbytes,
1430+
randbytes + 32,
1431+
randbytes,
14331432
tls_prf_get_type( tls_prf ) );
14341433
}
14351434
#endif

features/nanostack/sal-stack-nanostack/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ override CFLAGS += -I$(EVENTLOOP_DIR)/nanostack-event-loop
3737
override CFLAGS += -I$(NSDL_DIR)/nsdl-c
3838
override CFLAGS += -I$(COAP_DIR)
3939
override CFLAGS += -I$(COAP_SERVICE_LIB)/coap-service
40-
override CFLAGS += -I$(MBEDTLS_DIR)/include
40+
override CFLAGS += -I$(MBEDTLS_DIR)/include -I$(MBEDTLS_DIR)/crypto/include
4141
override CFLAGS += $(addprefix -I,$(INCLUDE_DIRS))
4242
override CFLAGS += $(addprefix -D,$(FLAGS))
4343

@@ -153,7 +153,7 @@ mbed-release-build-$(1): $(1)-$(2)-$(3)-build
153153
.PHONY: $(1)-$(2)-build
154154
$(1)-$(2)-$(3)-build: export-headers
155155
@echo Build $(2) on $(1) for $(3)
156-
make CC=$(CC_$(1)) CONFIG=$(2) CPU=$(3) APPEND_LIB_NAME=1 CFLAGS="-DNS_USE_EXTERNAL_MBED_TLS -I../mbedtls/include/"
156+
make CC=$(CC_$(1)) CONFIG=$(2) CPU=$(3) APPEND_LIB_NAME=1 CFLAGS="-DNS_USE_EXTERNAL_MBED_TLS -I../mbedtls/include/ -I../crypto/include/"
157157

158158
# Generate target directory name
159159
# Like: FEATURE_NANOSTACK/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_CORTEX_M0P

features/nanostack/sal-stack-nanostack/nanostack/ws_bbr_api.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,24 @@ int ws_bbr_node_keys_remove(int8_t interface_id, uint8_t *eui64);
120120
*/
121121
int ws_bbr_node_access_revoke_start(int8_t interface_id);
122122

123+
/**
124+
* Set EAPOL node limit
125+
*
126+
* Border router stores EAPOL key information for each authenticated node.
127+
* Sets the maximum number of EAPOL nodes stored by border router. If count
128+
* of node's exceed the limit, border router deletes the node information
129+
* starting from oldest node (node that has authenticated longest time
130+
* ago), to make room for new nodes. When network keys are updated, nodes
131+
* which have been removed from storage, must make full authentication again.
132+
* Value for this parameter should be set to be more than maximum amount of
133+
* nodes that are expected to be connected to border router.
134+
*
135+
* \param interface_id Network interface ID.
136+
* \param limit Limit for nodes
137+
*
138+
* \return 0, Node limit set
139+
* \return <0 Node limit set failed.
140+
*/
141+
int ws_bbr_eapol_node_limit_set(int8_t interface_id, uint16_t limit);
142+
123143
#endif /* WS_BBR_API_H_ */

features/nanostack/sal-stack-nanostack/source/6LoWPAN/Bootstraps/Generic/protocol_6lowpan_bootstrap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ int8_t arm_6lowpan_bootstarp_bootstrap_set(int8_t interface_id, net_6lowpan_mode
17871787
*/
17881788
if (cur->lowpan_info & INTERFACE_NWK_ROUTER_DEVICE) {
17891789
//rpl_control_set_domain_on_interface(cur, protocol_6lowpan_rpl_domain, true);
1790-
//rpl_control_set_callback(protocol_6lowpan_rpl_domain, protocol_6lowpan_bootstrap_rpl_callback, NULL, cur);
1790+
//rpl_control_set_callback(protocol_6lowpan_rpl_domain, protocol_6lowpan_bootstrap_rpl_callback, NULL, NULL, cur);
17911791
}
17921792
#endif
17931793
cur->configure_flags |= INTERFACE_BOOTSTRAP_DEFINED;
@@ -2182,7 +2182,7 @@ void nwk_6lowpan_nd_address_registartion_ready(protocol_interface_info_entry_t *
21822182
// arm_nwk_6lowpan_rpl_dodag_poison from a previous connection may have left force_leaf set
21832183
rpl_control_force_leaf(protocol_6lowpan_rpl_domain, false);
21842184
rpl_control_set_domain_on_interface(cur, protocol_6lowpan_rpl_domain, true);
2185-
rpl_control_set_callback(protocol_6lowpan_rpl_domain, protocol_6lowpan_bootstrap_rpl_callback, NULL, cur);
2185+
rpl_control_set_callback(protocol_6lowpan_rpl_domain, protocol_6lowpan_bootstrap_rpl_callback, NULL, NULL, cur);
21862186
}
21872187
// Send unicast DIS to coordinator
21882188
nwk_bootstrap_icmp_rpl_dis_coord_msg_tx(cur);

features/nanostack/sal-stack-nanostack/source/6LoWPAN/ws/ws_bbr_api.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,6 @@ int ws_bbr_node_keys_remove(int8_t interface_id, uint8_t *eui64)
609609
{
610610
(void) interface_id;
611611
(void) eui64;
612-
613612
#ifdef HAVE_WS_BORDER_ROUTER
614613
return ws_pae_controller_node_keys_remove(interface_id, eui64);
615614
#else
@@ -620,11 +619,20 @@ int ws_bbr_node_keys_remove(int8_t interface_id, uint8_t *eui64)
620619
int ws_bbr_node_access_revoke_start(int8_t interface_id)
621620
{
622621
(void) interface_id;
623-
624622
#ifdef HAVE_WS_BORDER_ROUTER
625623
return ws_pae_controller_node_access_revoke_start(interface_id);
626624
#else
627625
return -1;
628626
#endif
629627
}
630628

629+
int ws_bbr_eapol_node_limit_set(int8_t interface_id, uint16_t limit)
630+
{
631+
(void) interface_id;
632+
#ifdef HAVE_WS_BORDER_ROUTER
633+
return ws_pae_controller_node_limit_set(interface_id, limit);
634+
#else
635+
(void) limit;
636+
return -1;
637+
#endif
638+
}

0 commit comments

Comments
 (0)