File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
features/nanostack/mbed-mesh-api Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ class WisunBorderRouter {
318318 char *_shared_secret = NULL ;
319319 uint16_t _shared_secret_len = 0 ;
320320 int8_t _mesh_if_id = -1 ;
321+ bool _radius_ipv6_addr_init = false ;
321322 bool _radius_ipv6_addr_set = false ;
322323 bool _configured = false ;
323324 bool _radius_timing_set = false ;
Original file line number Diff line number Diff line change @@ -281,8 +281,10 @@ mesh_error_t WisunBorderRouter::set_radius_server_ipv6_address(const char *addre
281281 }
282282 // Stored address (returned by get) is in the format given by user of the interface
283283 strcpy (_radius_ipv6_addr, address);
284+ _radius_ipv6_addr_init = true ;
284285 _radius_ipv6_addr_set = true ;
285286 } else {
287+ _radius_ipv6_addr_init = true ;
286288 _radius_ipv6_addr_set = false ;
287289 }
288290
@@ -303,6 +305,10 @@ mesh_error_t WisunBorderRouter::set_bbr_radius_address(void)
303305{
304306 int status;
305307
308+ if (!_radius_ipv6_addr_init) {
309+ return MESH_ERROR_NONE;
310+ }
311+
306312 if (_radius_ipv6_addr_set) {
307313 uint8_t ipv6_addr[16 ];
308314 if (!stoip6 (_radius_ipv6_addr, strlen (_radius_ipv6_addr), ipv6_addr)) {
@@ -348,7 +354,7 @@ mesh_error_t WisunBorderRouter::set_radius_shared_secret(uint16_t shared_secret_
348354mesh_error_t WisunBorderRouter::set_bbr_radius_shared_secret (void )
349355{
350356 if (_shared_secret_len == 0 || _shared_secret == NULL ) {
351- return MESH_ERROR_UNKNOWN ;
357+ return MESH_ERROR_NONE ;
352358 }
353359
354360 int status = ws_bbr_radius_shared_secret_set (_mesh_if_id, _shared_secret_len, (uint8_t *) _shared_secret);
You can’t perform that action at this time.
0 commit comments