[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getpeername() bug with non-connected sockets
From: |
Samuel Thibault |
Subject: |
Re: getpeername() bug with non-connected sockets |
Date: |
Mon, 11 Oct 2010 18:14:02 +0200 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Pino Toscano, le Mon 11 Oct 2010 17:15:55 +0200, a écrit :
> Alle lunedì 11 ottobre 2010, Samuel Thibault ha scritto:
> > Pino Toscano, le Sun 10 Oct 2010 23:46:10 +0200, a écrit :
> > > make_sockaddr_port() calls the getname function of the sock-ops of
> > > the current sock struct, which can be one of
> > > - linux-src/net/ipv6/af_inet6.c:inet6_getname()
> > > - linux-src/net/ipv4/af_inet.c:inet_getname()
> > > - linux-src/net/core/sock.c:sock_no_getname()
> > > all of them return negative errno values, which
> > > make_sockaddr_port() return straight those as well.
> > > Not totally sure about where to fix, i.e. a "return -err" in
> > > make_sockaddr_port() after the getname call, or in all the callers
> > > of make_sockaddr_port().
> >
> > Hurd functions don't usually return -errnos, only Linux-inherited
> > ones do.
>
> I see; attached the commit with the fix.
Applied, thanks!
Samuel