NetBSD-Bugs archive

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

Re: PR/42430 mdnsd hangs on read_msg: ERROR failed to get errsd via SCM_RIGHTS



The following reply was made to PR bin/42430; it has been noted by GNATS.

From: Edgar =?iso-8859-1?B?RnXf?= <ef%math.uni-bonn.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: PR/42430 mdnsd hangs on read_msg: ERROR failed to get errsd via
 SCM_RIGHTS
Date: Wed, 28 Jan 2015 19:55:18 +0100

 --BOKacYhQ+x31HxR3
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 > I just checked in a fix for this, can you re-test?
 Could we incorporate this fix into pkgsrc's net/mDNSResponder?
 (I have the attached patch in LOCALPATCHES, and it works fine).
 
 --BOKacYhQ+x31HxR3
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=PR_42430
 
 --- mDNSShared/uds_daemon.c
 +++ mDNSShared/uds_daemon.c
 @@ -3596,12 +3596,15 @@ mDNSlocal void read_msg(request_state *r
  #if !defined(_WIN32)
  		cmsg = CMSG_FIRSTHDR(&msg);
  #if DEBUG_64BIT_SCM_RIGHTS
 -		LogMsg("%3d: Expecting %d %d %d %d", req->sd, sizeof(cbuf),       sizeof(cbuf),   SOL_SOCKET,       SCM_RIGHTS);
 -		LogMsg("%3d: Got       %d %d %d %d", req->sd, msg.msg_controllen, cmsg->cmsg_len, cmsg->cmsg_level, cmsg->cmsg_type);
 +		LogMsg("%3d: Expecting %d %d %d %d", req->sd, sizeof(cbuf),       CMSG_LEN(sizeof(dnssd_sock_t)),   SOL_SOCKET,       SCM_RIGHTS);
 +		if (cmsg)
 +			LogMsg("%3d: Got       %d %d %d %d", req->sd, msg.msg_controllen, cmsg->cmsg_len, cmsg->cmsg_level, cmsg->cmsg_type);
 +		else
 +			LogMsg("%3d: Got       %d NULL", req->sd, msg.msg_controllen);
  #endif // DEBUG_64BIT_SCM_RIGHTS
  		if (msg.msg_controllen == sizeof(cbuf) &&
 -			cmsg->cmsg_len     == sizeof(cbuf) &&
 -			cmsg->cmsg_level   == SOL_SOCKET   &&
 +			cmsg->cmsg_len     == CMSG_LEN(sizeof(dnssd_sock_t)) &&
 +			cmsg->cmsg_level   == SOL_SOCKET &&
  			cmsg->cmsg_type    == SCM_RIGHTS)
  			{
  #if APPLE_OSX_mDNSResponder
 
 --BOKacYhQ+x31HxR3--
 


Home | Main Index | Thread Index | Old Index