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 @@ -331,6 +331,7 @@ class WisunBorderRouter {
331
331
char *_shared_secret = NULL ;
332
332
uint16_t _shared_secret_len = 0 ;
333
333
int8_t _mesh_if_id = -1 ;
334
+ bool _radius_ipv6_addr_init = false ;
334
335
bool _radius_ipv6_addr_set = false ;
335
336
bool _configured = false ;
336
337
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
281
281
}
282
282
// Stored address (returned by get) is in the format given by user of the interface
283
283
strcpy (_radius_ipv6_addr, address);
284
+ _radius_ipv6_addr_init = true ;
284
285
_radius_ipv6_addr_set = true ;
285
286
} else {
287
+ _radius_ipv6_addr_init = true ;
286
288
_radius_ipv6_addr_set = false ;
287
289
}
288
290
@@ -303,6 +305,10 @@ mesh_error_t WisunBorderRouter::set_bbr_radius_address(void)
303
305
{
304
306
int status;
305
307
308
+ if (!_radius_ipv6_addr_init) {
309
+ return MESH_ERROR_NONE;
310
+ }
311
+
306
312
if (_radius_ipv6_addr_set) {
307
313
uint8_t ipv6_addr[16 ];
308
314
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_
348
354
mesh_error_t WisunBorderRouter::set_bbr_radius_shared_secret (void )
349
355
{
350
356
if (_shared_secret_len == 0 || _shared_secret == NULL ) {
351
- return MESH_ERROR_UNKNOWN ;
357
+ return MESH_ERROR_NONE ;
352
358
}
353
359
354
360
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