mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix cache_lookup subnet print to not print messages without rrsets
and perform in-depth check on node in the addrtree.
This commit is contained in:
parent
523710f371
commit
8fd4b91afc
1 changed files with 7 additions and 5 deletions
|
|
@ -1785,10 +1785,6 @@ cache_lookup_subnet_addrnode(struct query_info* q, struct reply_info* d,
|
|||
sldns_wire2str_dname_buf(q->qname, q->qname_len, s, sizeof(s));
|
||||
sldns_wire2str_type_buf(q->qtype, tp, sizeof(tp));
|
||||
sldns_wire2str_class_buf(q->qclass, cl, sizeof(cl));
|
||||
if(!ssl_printf(inf->ssl, "subnet %s/%d%s %s %s %s " ARG_LL "d\n", astr,
|
||||
(int)scope, (only_match_scope_zero?" scope_zero":""),
|
||||
s, cl, tp, (long long)(ttl-*inf->worker->env.now)))
|
||||
return;
|
||||
sldns_wire2str_rcode_buf(FLAGS_GET_RCODE(d->flags),
|
||||
rc, sizeof(rc));
|
||||
snprintf(fg, sizeof(fg), "%s%s%s%s%s%s%s%s",
|
||||
|
|
@ -1805,6 +1801,12 @@ cache_lookup_subnet_addrnode(struct query_info* q, struct reply_info* d,
|
|||
/* rrsets have timed out or do not exist */
|
||||
return;
|
||||
}
|
||||
if(!ssl_printf(inf->ssl, "subnet %s/%d%s %s %s %s " ARG_LL "d\n", astr,
|
||||
(int)scope, (only_match_scope_zero?" scope_zero":""),
|
||||
s, cl, tp, (long long)(ttl-*inf->worker->env.now))) {
|
||||
rrset_array_unlock(d->ref, d->rrset_count);
|
||||
return;
|
||||
}
|
||||
ssl_printf(inf->ssl,
|
||||
"subnet msg %s %s %s%s %s %d %d " ARG_LL "d %d %u %u %u %d %s\n",
|
||||
s, cl, tp, fg, rc,
|
||||
|
|
@ -1842,7 +1844,7 @@ addrtree_traverse_visit_edge(struct addredge* edge, addrkey_t* addr,
|
|||
{
|
||||
size_t n;
|
||||
addrlen_t addrlen;
|
||||
if(!edge)
|
||||
if(!edge || !edge->node)
|
||||
return;
|
||||
addrlen = edge->len;
|
||||
/* ceil() */
|
||||
|
|
|
|||
Loading…
Reference in a new issue