From: Bernd Eckenfels Date: Tue, 24 Aug 1999 16:47:24 +0000 (+0000) Subject: clear struct to get all matching v6 addresses in ifconfig X-Git-Tag: v1.60~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c98affb73d282f97bfd3de688206d723f1665ea;p=platform%2Fupstream%2Fnet-tools.git clear struct to get all matching v6 addresses in ifconfig (thanks to Ulrich Drepper) --- diff --git a/lib/inet6.c b/lib/inet6.c index aa48bf7..33364b4 100644 --- a/lib/inet6.c +++ b/lib/inet6.c @@ -3,7 +3,7 @@ * support functions for the net-tools. * (most of it copied from lib/inet.c 1.26). * - * Version: $Id: inet6.c,v 1.7 1998/11/29 13:29:44 philip Exp $ + * Version: $Id: inet6.c,v 1.8 1999/08/24 16:47:24 ecki Exp $ * * Author: Fred N. van Kempen, * Copyright 1993 MicroWalt Corporation @@ -11,6 +11,7 @@ * Modified: *960808 {0.01} Frank Strauss : adapted for IPv6 support *980701 {0.02} Arnaldo C. Melo: GNU gettext instead of catgets + *990824 Bernd Eckenfels: clear members for selecting v6 address * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -48,6 +49,7 @@ static int INET6_resolve(char *name, struct sockaddr_in6 *sin6) struct addrinfo req, *ai; int s; + memset (&req, '\0', sizeof req); req.ai_family = AF_INET6; if ((s = getaddrinfo(name, NULL, &req, &ai))) { fprintf(stderr, "getaddrinfo: %s: %s\n", name, gai_strerror(s));