A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ?

Konstantin Belousov kostikbel at gmail.com
Thu Apr 22 19:34:47 UTC 2021


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.


More information about the freebsd-hackers mailing list