2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[1386] EDNS TCP fallback disabled. NB: I still think it might be

useful in DNSSEC situation when the resolver fully supports
	DNSSEC-aware clients.
This commit is contained in:
Dima Volodin
2011-12-19 11:41:31 -05:00
parent 7d90bbbc93
commit ff3a2e3592
3 changed files with 8 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
xxx. [bug] dvv
resolver: EDNS fallback on FORMERR
resolver: If an upstream server responds with FORMERR to an EDNS query,
try querying it without EDNS.
(Trac #1386, git TBD)
342. [bug] stephen

View File

@@ -558,11 +558,9 @@ private:
// see if it's a FORMERR and a potential EDNS problem
if (incoming.getRcode() == Rcode::FORMERR()) {
if (protocol_ == IOFetch::UDP && edns_) {
// try EDNS over TCP
send(IOFetch::TCP, true);
return (false);
} else if (protocol_ == IOFetch::TCP && edns_) {
// try UDP, no EDNS
// TODO: in case we absolutely need EDNS (i.e. for DNSSEC
// aware queries), we might want to try TCP before we give
// up. For now, just try UDP, no EDNS
send(IOFetch::UDP, false);
return (false);
}

View File

@@ -101,8 +101,7 @@ public:
enum QueryStatus {
NONE = 0, ///< Default
EDNS_UDP = 1, ///< EDNS query over UDP
EDNS_TCP = 2, ///< EDNS query over TCP
NON_EDNS_UDP = 3, ///< Non-EDNS query over UDP
NON_EDNS_UDP = 2, ///< Non-EDNS query over UDP
COMPLETE = 6 ///< Query is complete
};
@@ -225,7 +224,7 @@ public:
EXPECT_TRUE(query.getEDNS());
// Return FORMERROR
setFORMERR(message);
expected_ = EDNS_TCP;
expected_ = NON_EDNS_UDP;
break;
case NON_EDNS_UDP:
@@ -346,14 +345,7 @@ public:
// Set up state-dependent bits:
switch (expected_) {
case EDNS_TCP:
EXPECT_TRUE(query.getEDNS());
// Return FORMERROR
setFORMERR(message);
expected_ = NON_EDNS_UDP;
break;
default:
default:
FAIL() << "TcpReceiveHandler called with unknown state";
}