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

xfr: fix message count if faulty transfer

parent bb199dd3
Branches
Tags
No related merge requests found
Pipeline #1311 passed with stages
in 8 minutes and 46 seconds
......@@ -57,15 +57,15 @@ int xfr_process_list(knot_pkt_t *pkt, xfr_put_cb process_item,
ret = knot_pkt_put(pkt, 0, &soa_rr, KNOT_PF_NOTRUNC);
}
/* Update counters. */
xfr_stats_add(&xfer->stats, pkt->size);
/* If a rrset is larger than the message,
* fail to avoid infinite loop of empty messages */
if (ret == KNOT_ESPACE && pkt->rrset_count < 1) {
return KNOT_ENOXFR;
}
/* Update counters. */
xfr_stats_add(&xfer->stats, pkt->size);
return ret;
}
......
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