NetBSD Problem Report #29279
From bryan@darkforest.org Tue Feb 8 02:16:56 2005
Return-Path: <bryan@darkforest.org>
Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55])
by narn.netbsd.org (Postfix) with ESMTP id 4ECD863B400
for <gnats-bugs@gnats.netbsd.org>; Tue, 8 Feb 2005 02:16:56 +0000 (UTC)
Message-Id: <200502080216.j182Giv23269@darkforest.org>
Date: Mon, 7 Feb 2005 18:16:44 -0800 (PST)
From: bp009@terran.org
Reply-To: bp009@terran.org
To: gnats-bugs@netbsd.org
Subject: Trivial fix to IPv6 in wget
X-Send-Pr-Version: 3.95
>Number: 29279
>Category: pkg
>Synopsis: Strange behavior from wget on IPv6 addresses
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bouyer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 08 02:17:00 +0000 2005
>Closed-Date: Wed Feb 09 11:46:49 +0000 2005
>Last-Modified: Wed Feb 09 11:46:49 +0000 2005
>Originator: Bryan J. Phillippe
>Release: NetBSD 1.6.2_STABLE - NetBSD-current
>Organization:
-bp
--
>Environment:
System: NetBSD jupiter 1.6.2_STABLE NetBSD 1.6.2_STABLE (jupiter 20030804) #7: Sat May 15 08:34:21 PDT 2004 bryan@jupiter:/usr/home/bryan/etc/src/NetBSD/1.6/src/sys/arch/alpha/compile/jupiter alpha
Architecture: alpha
Machine: alpha
>Description:
wget uses an uninitialized struct sockaddr for networking. For
IPv4 this probably doesn't cause much trouble, but for IPv6 it
can result in DAD occuring (~6 sec) before connect() returns (and
possibly other more sinister problems).
>How-To-Repeat:
Connect to an IPv6 address with wget and observe the delay and DAD
activity on the wire via tcpdump.
>Fix:
--- host.c.orig 2005-02-07 17:55:35.000000000 -0800
+++ host.c 2005-02-07 17:55:49.000000000 -0800
@@ -286,6 +286,8 @@
wget_sockaddr_set_address (wget_sockaddr *sa,
unsigned short port, ip_address *addr, int family)
{
+ memset (sa, 0, sizeof(*sa));
+
if (family == AF_INET)
{
sa->sin.sin_family = AF_INET;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->bouyer
Responsible-Changed-By: cube@netbsd.org
Responsible-Changed-When: Tue, 08 Feb 2005 14:37:47 +0000
Responsible-Changed-Why:
bouyer will handle it.
State-Changed-From-To: open->closed
State-Changed-By: bouyer@netbsd.org
State-Changed-When: Wed, 09 Feb 2005 11:46:49 +0000
State-Changed-Why:
Patch committed
Thanks !
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.