Debian Bug report logs - #47921
Getsockopt -- Operation Not Supported

version graph

Package: libc0.2-dev; Maintainer for libc0.2-dev is (unknown);

Reported by: Brent Fulgham <brent.fulgham@xpsystems.com>

Date: Wed, 20 Oct 1999 22:03:01 UTC

Severity: normal

Found in version 2.1.2-0pre12

Done: Roland McGrath <roland@frob.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian GNU C Library Maintainers <debian-glibc@lists.debian.org>:
Bug#47921; Package libc0.2-dev. (full text, mbox, link).


Acknowledgement sent to Brent Fulgham <brent.fulgham@xpsystems.com>:
New Bug report received and forwarded. Copy sent to Debian GNU C Library Maintainers <debian-glibc@lists.debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

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
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;
}


Information forwarded to debian-bugs-dist@lists.debian.org, Joel Klecker <debian-glibc@lists.debian.org>:
Bug#47921; Package libc0.2-dev. (full text, mbox, link).


Acknowledgement sent to Roland McGrath <roland@frob.com>:
Extra info received and forwarded to list. Copy sent to Joel Klecker <debian-glibc@lists.debian.org>. (full text, mbox, link).


Message #10 received at 47921@bugs.debian.org (full text, mbox, reply):

From: Roland McGrath <roland@frob.com>
To: 47921@bugs.debian.org
Subject: getsockopt in hurd libc
Date: Wed, 5 Jan 2000 15:51:01 -0500
I think that getsockopt in the libc for hurd is in fact ok (given the
current interfaces).  I believe the problem reported was in the hurd
(pfinet), not in libc, and was fixed anyway a while ago.
If the reporter or maintainer concurs, please close this report.


Reply sent to Roland McGrath <roland@frob.com>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Brent Fulgham <brent.fulgham@xpsystems.com>:
Bug acknowledged by developer. (full text, mbox, link).


Message #15 received at 47921-done@bugs.debian.org (full text, mbox, reply):

From: Roland McGrath <roland@frob.com>
To: 47921-done@bugs.debian.org
Subject: getsockopt
Date: Wed, 29 Mar 2000 14:50:44 -0500
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).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat May 18 21:32:08 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.