gluon-radv-filterd: Initialize router->originator after alloc
The memory returned after malloc is not initialized. It must be initialized before it is accessed in update_tqs and compared against 00:00:00:00:00:00. Otherwise the TQ retrievel could fail because the originator address is never updated. Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
c39a62a63a
commit
34daf35529
@ -331,6 +331,7 @@ static struct router *router_add(const struct ether_addr *mac) {
|
||||
G.routers = router;
|
||||
router->eol.tv_sec = 0;
|
||||
router->eol.tv_nsec = 0;
|
||||
memset(&router->originator, 0, sizeof(router->originator));
|
||||
|
||||
return router;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user