NetBSD Problem Report #46693
From taca@back-street.net Thu Jul 12 02:12:39 2012
Return-Path: <taca@back-street.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 3D13963B85F
for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Jul 2012 02:12:39 +0000 (UTC)
Message-Id: <20120712021235.48573158E70@www.back-street.net>
Date: Thu, 12 Jul 2012 11:12:35 +0900 (JST)
From: taca@back-street.net
Reply-To: taca@back-street.net
To: gnats-bugs@gnats.NetBSD.org
Subject: DNS Service Discovery library uses setsockopt(2) with wrong argument
X-Send-Pr-Version: 3.95
>Number: 46693
>Category: lib
>Synopsis: DNS Service Discovery library uses setsockopt(2) with wrong argument
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 12 02:15:00 +0000 2012
>Closed-Date: Mon Oct 01 17:51:25 +0000 2012
>Last-Modified: Mon Oct 01 17:51:25 +0000 2012
>Originator: Takahiro Kambe
>Release: NetBSD 6.0_BETA2
>Organization:
>Environment:
System: NetBSD ns.back-street.net 6.0_BETA2 NetBSD 6.0_BETA2 (HPMICRO) #169: Tue Jun 26 21:48:02 JST 2012 taca@edge.back-street.net:/data/amd64/obj/sys/arch/amd64/compile/HPMICRO amd64
Architecture: x86_64
Machine: amd64
>Description:
DNS Service Discovery library (libdns_sd) uses setsockopt(2)
with wrong argument on 64bit long environment.
>How-To-Repeat:
Run ntpd(8) and its LOG_INFO log.
Jun 26 03:00:21 ns ntpd[475]: Attempting to register mDNS
Jun 26 03:00:21 ns ntpd[475]: dnssd_clientstub ConnectToServer: SO_NOSIGPIPE failed 22 Invalid argument
>Fix:
Strangely, "const unsigned long" is used instead of simply "int".
This change should be pulled up to netbsd-6 branch.
Index: external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c
===================================================================
RCS file: /cvs/src-6/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 dnssd_clientstub.c
--- external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c 25 Jan 2012 08:55:57 -0000 1.1.1.1
+++ external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c 12 Jul 2012 01:14:45 -0000
@@ -636,7 +636,7 @@
else
{
#ifdef SO_NOSIGPIPE
- const unsigned long optval = 1;
+ int optval = 1;
#endif
*ref = NULL;
sdr->sockfd = socket(AF_DNSSD, SOCK_STREAM, 0);
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: lib/46693: DNS Service Discovery library uses setsockopt(2) with
wrong argument
Date: Thu, 12 Jul 2012 17:54:25 +0000
On Thu, Jul 12, 2012 at 02:15:00AM +0000, taca@back-street.net wrote:
> --- external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c 25 Jan 2012 08:55:57 -0000 1.1.1.1
> +++ external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c 12 Jul 2012 01:14:45 -0000
> @@ -636,7 +636,7 @@
> else
> {
> #ifdef SO_NOSIGPIPE
> - const unsigned long optval = 1;
> + int optval = 1;
> #endif
> *ref = NULL;
> sdr->sockfd = socket(AF_DNSSD, SOCK_STREAM, 0);
>
please just commit that.
--
David A. Holland
dholland@netbsd.org
From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46693 CVS commit: src/external/apache2/mDNSResponder/dist/mDNSShared
Date: Mon, 24 Sep 2012 14:17:56 +0000
Module Name: src
Committed By: taca
Date: Mon Sep 24 14:17:56 UTC 2012
Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSShared: dnssd_clientstub.c
Log Message:
Fix setsockopt(2) error on 64bit environment (amd64).
Reported by PR lib/46693 by me and OK'ed by dholland@.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->pending-pullups
State-Changed-By: taca@NetBSD.org
State-Changed-When: Mon, 24 Sep 2012 14:32:58 +0000
State-Changed-Why:
Commited to current and pullup to netbsd-6 has requested.
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46693 CVS commit: [netbsd-6] src/external/apache2/mDNSResponder/dist/mDNSShared
Date: Mon, 1 Oct 2012 17:45:41 +0000
Module Name: src
Committed By: riz
Date: Mon Oct 1 17:45:40 UTC 2012
Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSShared [netbsd-6]:
dnssd_clientstub.c
Log Message:
Pull up following revision(s) (requested by taca in ticket #571):
external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c: revision 1.4
Fix setsockopt(2) error on 64bit environment (amd64).
Reported by PR lib/46693 by me and OK'ed by dholland@.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.6.1 \
src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 01 Oct 2012 17:51:25 +0000
State-Changed-Why:
pullups complete
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.