mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Simplify reverse lookup code in core_hostname_lookup.
This commit is contained in:
parent
38351efa8d
commit
1b19bcb887
@ -88,17 +88,8 @@ class UserResolver : public DNS::Request
|
||||
|
||||
if (this->question.type == DNS::QUERY_PTR)
|
||||
{
|
||||
UserResolver* res_forward;
|
||||
if (bound_user->client_sa.family() == AF_INET6)
|
||||
{
|
||||
/* IPV6 forward lookup */
|
||||
res_forward = new UserResolver(this->manager, this->creator, bound_user, ans_record->rdata, DNS::QUERY_AAAA);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* IPV4 lookup */
|
||||
res_forward = new UserResolver(this->manager, this->creator, bound_user, ans_record->rdata, DNS::QUERY_A);
|
||||
}
|
||||
const DNS::QueryType qt = bound_user->client_sa.family() == AF_INET6 ? DNS::QUERY_AAAA : DNS::QUERY_A;
|
||||
UserResolver* res_forward = new UserResolver(this->manager, this->creator, bound_user, ans_record->rdata, qt);
|
||||
try
|
||||
{
|
||||
this->manager->Process(res_forward);
|
||||
|
Loading…
x
Reference in New Issue
Block a user