]> arthur.barton.de Git - ngircd-alex.git/commit
resolve: fix reverse lookups of client connections with ConnectIPv6=no
authorFlorian Westphal <fw@strlen.de>
Mon, 25 Apr 2011 16:00:10 +0000 (18:00 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 25 Apr 2011 16:00:10 +0000 (18:00 +0200)
commite4e1595bffdb6c43cd163ae576ee9715b859e494
tree74aa2bebd48254416067e5c974713acb07f871c0
parent67a9d994e33e3adbb32019a199678e84537a040c
resolve: fix reverse lookups of client connections with ConnectIPv6=no

We re-use the same helper function for both forward lookups
(when we want to connect to a peer server) and for validation of reverse
loopups (where we make a lookup on the hostname returned
by a reverse lookup on the IP address that connected).

Problem:

When ConnectIPv6=no, the forward lookup helper sets the adderss family
to AF_INET, and, if out client connected via ipv6, we fail to validate
the result.

Thus move the ConnectIPvX check out of the helper.
src/ngircd/resolve.c