summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Schatz <genius3000@g3k.solutions>2020-03-31 01:54:54 -0600
committerMatt Schatz <genius3000@g3k.solutions>2020-04-04 19:12:28 -0600
commitd6133886f5a84000fcb2df6e993d252ecb55b72d (patch)
tree20dad857c235c1f1be472af81420e6ffa6177995
parentfe23e07f024c2cbcb05007f3ed70c9acf632a2f0 (diff)
Don't override a different Displayed Host with the rDNS.
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.
-rw-r--r--src/coremods/core_hostname_lookup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/coremods/core_hostname_lookup.cpp b/src/coremods/core_hostname_lookup.cpp
index 60f858ecd..0dd077a8e 100644
--- a/src/coremods/core_hostname_lookup.cpp
+++ b/src/coremods/core_hostname_lookup.cpp
@@ -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