Skip to content
Snippets Groups Projects
Commit 2c13f014 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

Merge branch 'axfr_16kib' into 'master'

Axfr 16kib

See merge request !1173
parents 4bbbadcd 406d7018
No related branches found
No related tags found
1 merge request!1173Axfr 16kib
Pipeline #70415 passed
......@@ -57,6 +57,12 @@ static int axfr_put_rrsets(knot_pkt_t *pkt, zone_node_t *node,
state->cur_rrset = i;
return ret;
}
if (pkt->size > KNOT_WIRE_PTR_MAX) {
// optimization: once the XFR DNS message is > 16 KiB, compression
// is limited. Better wrap to next message.
state->cur_rrset = i + 1;
return KNOT_ESPACE;
}
}
state->cur_rrset = 0;
......
......@@ -63,6 +63,13 @@ static int ixfr_put_chg_part(knot_pkt_t *pkt, struct ixfr_proc *ixfr,
knot_soa_serial(ixfr->cur_rr.rrs.rdata) == ixfr->soa_to) {
break;
}
if (pkt->size > KNOT_WIRE_PTR_MAX) {
// optimization: once the XFR DNS message is > 16 KiB, compression
// is limited. Better wrap to next message.
return KNOT_ESPACE;
}
IXFR_SAFE_PUT(pkt, &ixfr->cur_rr);
if (ixfr->cur_rr.type == KNOT_RRTYPE_SOA) {
ixfr->in_remove_section = !ixfr->in_remove_section;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment