Commit d90a510b authored by Daniel Salzman's avatar Daniel Salzman

xfr: fix stats calculation if no EDNS is present

parent 55cb2497
......@@ -57,7 +57,8 @@ int xfr_process_list(knot_pkt_t *pkt, xfr_put_cb put, knotd_qdata_t *qdata)
/* Update counters. */
xfr_stats_add(&xfer->stats, pkt->size + knot_rrset_size(&qdata->opt_rr));
size_t opt_size = knot_rrset_empty(&qdata->opt_rr) ? 0 : knot_rrset_size(&qdata->opt_rr);
xfr_stats_add(&xfer->stats, pkt->size + opt_size);
/* If a rrset is larger than the message,
* fail to avoid infinite loop of empty messages */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment