On Tue, May 07, 2013 at 21:15, Stuart Henderson wrote: > On 2013/05/07 16:09, Ted Unangst wrote: >> On Tue, May 07, 2013 at 20:54, Stuart Henderson wrote: >> >> >> I don't like logging both because there's a not unreasonable chance >> >> the reverse name will be a complete lie, which will just mislead you. >> > >> > Oh, it doesn't do a forward check of the name it got from reverse >> > lookup? Yes that's bad. >> >> Well, it kind of does. It does a reverse lookup to get a hostname. >> Then it does a forward lookup for that hostname and logs that IP. doh. >> >> Forward lookup? Yes. Forward *check*? No. > > Wow. > > *stab stab stab*
oh, no, sorry, my mistake. I entirely misread the second getnameinfo call (thought it was reading from hbuf...). It does something sensible and does numeric lookup on the socket address. Still doesn't check that the reversed hostname is sensible, which is the issue here.