Commit fdaa774c authored by Marek Vavrusa's avatar Marek Vavrusa

Keep RR ordering (don't merge) where it matters.

parent 966c3e28
......@@ -584,7 +584,7 @@ static int xfr_task_resp(xfrworker_t *w, knot_ns_xfr_t *rq)
return KNOT_EOK; /* Ignore */
}
ret = knot_pkt_parse_payload(re, 0);
ret = knot_pkt_parse_payload(re, KNOT_PACKET_DUPL_NO_MERGE);
if (ret != KNOT_EOK) {
knot_pkt_free(&re);
return KNOT_EOK; /* Ignore */
......
......@@ -373,19 +373,20 @@ static int xfrin_check_tsig(knot_pkt_t *packet, knot_ns_xfr_t *xfr,
/*----------------------------------------------------------------------------*/
static int xfrin_parse_first_rr(knot_pkt_t **dst, uint8_t *wire,
size_t wire_size, knot_rrset_t **rr)
static int xfrin_parse(knot_pkt_t **dst, uint8_t *wire, size_t wire_size)
{
assert(dst != NULL);
assert(rr != NULL);
int ret = KNOT_EOK;
knot_pkt_t *pkt = knot_pkt_new(wire, wire_size, NULL);
if (pkt == NULL) {
knot_pkt_free(&pkt);
return KNOT_ENOMEM;
}
int ret = knot_pkt_parse_question(pkt);
/* This is important, don't merge RRs together. The SOAs are ordered
* in a special way for a reason. */
ret = knot_pkt_parse(pkt, KNOT_PACKET_DUPL_NO_MERGE);
if (ret != KNOT_EOK) {
knot_pkt_free(&pkt);
return ret;
......
......@@ -733,7 +733,7 @@ int cmd_send(const char* lp, nsupdate_params_t *params)
free_sign_context(&sign_ctx);
return KNOT_ENOMEM;
}
ret = knot_pkt_parse(params->resp, 0);
ret = knot_pkt_parse(params->resp, KNOT_PACKET_DUPL_NO_MERGE);
if (ret != KNOT_EOK) {
ERR("failed to parse response, %s\n", knot_strerror(ret));
free_sign_context(&sign_ctx);
......
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