Date: Thu, 22 Apr 2021 22:34:38 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Gleb Popov <arrowd@freebsd.org> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? Message-ID: <YIHPzqgjRwDtrMrM@kib.kiev.ua> In-Reply-To: <CALH631maNoe_x%2BippbRTE3s8XarZ32Nrb%2BfXWUz-NMFeCre_-w@mail.gmail.com> References: <CALH631kLCApctk4iQJj6br0Pzeb6qsh9g3jz_SA8hH91ftQGDQ@mail.gmail.com> <YHiQ6qEjS2w8uYpS@kib.kiev.ua> <CALH631=3hqvfraume467OM%2BqGqp854sGJFfhO8b61mF%2BkbsJ2Q@mail.gmail.com> <E6626DFC-2014-412C-AEA2-ECE57835B058@yahoo.com> <CALH631mi0xOQGjd6F3Beu_BQdqAx8RYCrbkUi524F8S4rwo1aA@mail.gmail.com> <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <CALH631nrhyY%2BK3tPSwt1wuYHoZkz371UtjK%2BdG844RybtA2yKw@mail.gmail.com> <YIFQ/U34i1Jbxjv7@kib.kiev.ua> <CALH631maNoe_x%2BippbRTE3s8XarZ32Nrb%2BfXWUz-NMFeCre_-w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YIHPzqgjRwDtrMrM>