From 6916f72419959ccf073bba27ec2b6aaf0b76c411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20H=C3=BC=C3=9Fler?= Date: Thu, 3 Mar 2022 23:35:06 +0100 Subject: [PATCH] ipv6/nib: fix memcpy() bug in _handle_rtr_timeout --- sys/net/gnrc/network_layer/ipv6/nib/nib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c index 1985cc7a41..a35dec8314 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c @@ -1376,9 +1376,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))) {