Commit 017e6639 authored by Marek Vavrusa's avatar Marek Vavrusa

Some records may not have additionals.

Added check + test case.
parent be859e0d
......@@ -260,6 +260,11 @@ static int put_additional(knot_pkt_t *pkt, const knot_rrset_t *rr, knot_rrinfo_t
hint = knot_pkt_compr_hint(info, COMPR_HINT_RDATA + i);
node = rr->additional[i];
/* No additional node for this record. */
if (node == NULL) {
break;
}
/* \note Not processing wildcards as it's only optional. */
if (knot_dname_is_wildcard(node->owner)) {
continue;
......
......@@ -5,6 +5,7 @@ $TTL 3600
NS dns1
NS dns2
MX 10 mail
MX 20 mail-no-a-rr ; MX record without additional A/AAAA record
dns1 A 192.0.2.1
AAAA 2001:DB8::1
......
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