Commit 217e72e2 authored by Marek Vavruša's avatar Marek Vavruša

Merge branch 'bad_glue_bug'

parents 4e239b56 c1a65015
......@@ -115,8 +115,14 @@ int kr_cache_peek(namedb_txn_t *txn, knot_rrset_t *rr, uint32_t *timestamp)
rr->rrs.rr_count = found_rr->count;
rr->rrs.data = found_rr->data;
/* No time constraint or current timestamp */
if (timestamp == NULL || *timestamp <= found_rr->timestamp) {
/* No time constraint */
if (timestamp == NULL) {
return KNOT_EOK;
}
/* John Connor record cached from the future. */
if (*timestamp < found_rr->timestamp) {
*timestamp = 0;
return KNOT_EOK;
}
......
......@@ -111,8 +111,9 @@ static int iterate(struct knot_requestor *requestor, struct kr_layer_param *para
cur->flags |= QUERY_TCP;
return iterate(requestor, param);
}
/* Resolution failed, invalidate current NS. */
/* Resolution failed, invalidate current NS and reset to UDP. */
ret = invalidate_ns(rplan, cur);
cur->flags &= ~QUERY_TCP;
}
return ret;
......
......@@ -32,12 +32,21 @@ REPLY QR NOERROR
SECTION QUESTION
com. IN NS
SECTION AUTHORITY
com. IN NS lame-addr.gtld-servers.net.
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
lame-addr.gtld-servers.net. IN A 1.1.1.1
a.gtld-servers.net. IN A 1.1.1.1
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
RANGE_END
; lame.gtld-servers.net.
RANGE_BEGIN 0 100
ADDRESS 1.1.1.1
EANGE_END
; a.gtld-servers.net.
RANGE_BEGIN 0 100
ADDRESS 192.5.6.30
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment