From 4527273f1c5bca044577f2f8ed2d7e4f203bf485 Mon Sep 17 00:00:00 2001 From: Tomas Paukrt Date: Tue, 8 Oct 2019 11:51:48 +0200 Subject: route: fix output of "route -n -A inet6" The output of the command "route -n -A inet6" may be corrupted due to partially initialized structure snaddr6 in the function INET6_displayroutes. Signed-off-by: Tomas Paukrt Signed-off-by: Denys Vlasenko --- networking/route.c | 1 + 1 file changed, 1 insertion(+) (limited to 'networking/route.c') diff --git a/networking/route.c b/networking/route.c index a5d8d7cb9..e785b1da6 100644 --- a/networking/route.c +++ b/networking/route.c @@ -628,6 +628,7 @@ static void INET6_displayroutes(void) r = 0; while (1) { + memset(&snaddr6, 0, sizeof(snaddr6)); inet_pton(AF_INET6, addr6x + r, (struct sockaddr *) &snaddr6.sin6_addr); snaddr6.sin6_family = AF_INET6; -- cgit v1.2.3