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:
Sven Eckelmann 2017-12-20 15:16:32 +01:00 committed by Jan-Philipp Litza
parent c39a62a63a
commit 34daf35529
No known key found for this signature in database
GPG Key ID: 1FB658053CE27196

View File

@ -331,6 +331,7 @@ static struct router *router_add(const struct ether_addr *mac) {
G.routers = router; G.routers = router;
router->eol.tv_sec = 0; router->eol.tv_sec = 0;
router->eol.tv_nsec = 0; router->eol.tv_nsec = 0;
memset(&router->originator, 0, sizeof(router->originator));
return router; return router;
} }