From 34daf355291849e295cfdd6178ac681dc4d6da67 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Wed, 20 Dec 2017 15:16:32 +0100 Subject: [PATCH] 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 --- package/gluon-radv-filterd/src/gluon-radv-filterd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/package/gluon-radv-filterd/src/gluon-radv-filterd.c b/package/gluon-radv-filterd/src/gluon-radv-filterd.c index 262509db..b36a058b 100644 --- a/package/gluon-radv-filterd/src/gluon-radv-filterd.c +++ b/package/gluon-radv-filterd/src/gluon-radv-filterd.c @@ -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; }