]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Don't override a different Displayed Host with the rDNS.
authorMatt Schatz <genius3000@g3k.solutions>
Tue, 31 Mar 2020 07:54:54 +0000 (01:54 -0600)
committerMatt Schatz <genius3000@g3k.solutions>
Sun, 5 Apr 2020 01:12:28 +0000 (19:12 -0600)
If the dnsbl module is set to mark with a vHost, it can finish before
the hostname resolution finishes. This is especially the case when
the result is already cached.

Resolves #1770.

src/coremods/core_hostname_lookup.cpp

index 60f858ecd986be36a1a686b8f8526047a6685221..0dd077a8e6049343bcc9b93c6a6a823b7de2ef39 100644 (file)
@@ -136,7 +136,8 @@ class UserResolver : public DNS::Request
                        if (rev_match)
                        {
                                bound_user->WriteNotice("*** Found your hostname (" + this->question.name + (r->cached ? ") -- cached" : ")"));
-                               bound_user->ChangeRealHost(this->question.name, true);
+                               bool display_is_real = bound_user->GetDisplayedHost() == bound_user->GetRealHost();
+                               bound_user->ChangeRealHost(this->question.name, display_is_real);
                                dl->unset(bound_user);
                        }
                        else