projects
/
pdns
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c8628f
)
rec: Set the result to NoError before calling `preresolve`
author
Remi Gacogne
<remi.gacogne@powerdns.com>
Tue, 13 Dec 2016 15:21:17 +0000
(16:21 +0100)
committer
Remi Gacogne
<remi.gacogne@powerdns.com>
Tue, 13 Dec 2016 15:21:17 +0000
(16:21 +0100)
Otherwise `rq.rcode` needs to be set explicitly when handling the
query from `preresolve`, which is not documented and wasn't the case
before.
pdns/pdns_recursor.cc
patch
|
blob
|
history
diff --git
a/pdns/pdns_recursor.cc
b/pdns/pdns_recursor.cc
index 8c87337cbdca4a51cb6da9cf4e3f22d9d00e7117..818ecb8b2735ac0762d10a556e2ed2058907ea23 100644
(file)
--- a/
pdns/pdns_recursor.cc
+++ b/
pdns/pdns_recursor.cc
@@
-740,7
+740,8
@@
void startDoResolve(void *p)
bool variableAnswer = false;
bool shouldNotValidate = false;
- int res;
+ /* preresolve expects res (dq.rcode) to be set to RCode::NoError by default */
+ int res = RCode::NoError;
DNSFilterEngine::Policy appliedPolicy;
DNSRecord spoofed;
std::shared_ptr<RecursorLua4::DNSQuestion> dq = nullptr;