NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/46693: DNS Service Discovery library uses setsockopt(2) with wrong argument



>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 12 02:15:00 +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@localhost:/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);

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index