2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 15:05:16 +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 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) (Trac #1386, git TBD)
342. [bug] stephen 342. [bug] stephen

View File

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

View File

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