A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ?
Gleb Popov
arrowd at freebsd.org
Fri Apr 23 08:31:46 UTC 2021
On Thu, Apr 22, 2021 at 10:34 PM Konstantin Belousov <kostikbel at gmail.com>
wrote:
> On Thu, Apr 22, 2021 at 09:49:15PM +0300, Gleb Popov wrote:
> > On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov <kostikbel at gmail.com
> >
> > wrote:
> >
> > > There is no peer for listening socket.
> > >
> > > Show minimal code that works for you on Linux.
> > >
> >
> > Here you go: http://arrowd.name/un_linux.cpp
> > It is almost identical to FreeBSD one, but works for me on ArchLinux.
>
> Of course it works because it uses s2, that is, connected and not listening
> socket, for getsockopt(), same as the working FreeBSD version.
>
Ugh, uploaded wrong version, sorry. I changed it back to "s" and it still
works.
More information about the freebsd-hackers
mailing list