1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

Merge pull request #17741 from fabian18/bugfix-NIB_handle_rtr_timeout

ipv6/nib: fix memcpy() bug in _handle_rtr_timeout()
This commit is contained in:
benpicco 2022-03-07 13:39:05 +01:00 committed by GitHub
commit a9456b6935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1377,9 +1377,8 @@ static void _handle_rtr_timeout(_nib_dr_entry_t *router)
if ((router->next_hop != NULL) && (router->next_hop->mode & _DRL)) {
_nib_offl_entry_t *route = NULL;
unsigned iface = _nib_onl_get_if(router->next_hop);
ipv6_addr_t addr;
ipv6_addr_t addr = router->next_hop->ipv6;
memcpy(&addr, &router->next_hop, sizeof(addr));
_nib_drl_remove(router);
/* also remove all routes to that router */
while ((route = _nib_offl_iter(route))) {