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

Bug#47921: marked as done (Getsockopt -- Operation Not Supported)



Your message dated Wed, 29 Mar 2000 14:50:44 -0500
with message-id <200003291950.OAA30176@frob.com>
and subject line getsockopt
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Oct 1999 21:59:44 +0000
Received: (qmail 23555 invoked from network); 20 Oct 1999 21:59:39 -0000
Received: from unknown (HELO thresher.xpsystems.com) (207.171.47.5)
  by master.debian.org with SMTP; 20 Oct 1999 21:59:39 -0000
Received: by THRESHER with Internet Mail Service (5.5.2650.21)
	id <40RQVJS5>; Wed, 20 Oct 1999 14:59:40 -0700
Message-ID: <EDFD2A95EE7DD31187350090279C676707C3B9@THRESHER>
From: Brent Fulgham <brent.fulgham@xpsystems.com>
To: Submit-Bug <submit@bugs.debian.org>
Subject: Getsockopt -- Operation Not Supported
Date: Wed, 20 Oct 1999 14:59:39 -0700
X-Mailer: Internet Mail Service (5.5.2650.21)

Package:	libc0.2-dev
Version:	2.1.2-0pre12

Using a native-compiled version of apt, it fails while attempting
to make an http connection to the debian archive server.  The
failure occurs at this statement:

    unsigned int Err;
    unsigned int Len = sizeof(Err);
    if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
        return _error->Errno("getsockopt","Failed");

Where SOL_SOCKET and SO_ERROR are as defined in the socket.h header
file, and Fd is the socket descriptor (an int).

Failure is "Operation not supported".

=================================================================
(The routine in question)
// DoConnect - Attempt a connect operation				
// ---------------------------------------------------------------------
/* This helper function attempts a connection to a single address. */
static bool DoConnect(struct addrinfo *Addr,string Host,
		      unsigned long TimeOut,int &Fd,pkgAcqMethod *Owner)
{
   // Show a status indicator
   char Name[NI_MAXHOST];
   Name[0] = 0;
   getnameinfo(Addr->ai_addr,Addr->ai_addrlen,
	       Name,sizeof(Name),0,0,NI_NUMERICHOST);
   Owner->Status("Connecting to %s (%s)",Host.c_str(),Name);
   
   // Get a socket
   if ((Fd = socket(Addr->ai_family,Addr->ai_socktype,
		    Addr->ai_protocol)) < 0)
      return _error->Errno("socket","Could not create a socket");
   
   SetNonBlock(Fd,true);
   if (connect(Fd,Addr->ai_addr,Addr->ai_addrlen) < 0 &&
       errno != EINPROGRESS)
      return _error->Errno("connect","Cannot initiate the connection "
			   "to %s (%s).",Host.c_str(),Name);
   
   /* This implements a timeout for connect by opening the connection
      nonblocking */
   if (WaitFd(Fd,true,TimeOut) == false)
      return _error->Error("Could not connect to %s (%s), "
			   "connection timed out",Host.c_str(),Name);
   
   // Check the socket for an error condition
   unsigned int Err;
   unsigned int Len = sizeof(Err);
   if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
      return _error->Errno("getsockopt","Failed");
   
   if (Err != 0)
      return _error->Error("Could not connect to %s
(%s).",Host.c_str(),Name);

   return true;
}
---------------------------------------
Received: (at 47921-done) by bugs.debian.org; 29 Mar 2000 19:50:46 +0000
Received: (qmail 18653 invoked from network); 29 Mar 2000 19:50:46 -0000
Received: from r85aap012887.sbo-smr.ma.cable.rcn.com (HELO frob.com) (209.6.192.195)
  by master.debian.org with SMTP; 29 Mar 2000 19:50:46 -0000
Received: (from roland@localhost)
	by frob.com (8.9.1/8.9.1) id OAA30176;
	Wed, 29 Mar 2000 14:50:44 -0500
Date: Wed, 29 Mar 2000 14:50:44 -0500
From: Roland McGrath <roland@frob.com>
Message-Id: <200003291950.OAA30176@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: 47921-done@bugs.debian.org
Subject: getsockopt
X-Zippy-Says: We have DIFFERENT amounts of HAIR --

I am closing this bug report.  To my knowledge, hurd libc's getsockopt and
setsockopt are fine.  The problem that existed was in the hurd package, but
has been fixed there anyway.  If there is a problem with getsockopt, a new
report should be issued (and if the problem is an unexpected error return,
then the fault probably lies in the hurd package rather than libc).


Reply to: