Commit 310549ef authored by Daniel Salzman's avatar Daniel Salzman

submission: log DS check as notice if NXDOMAIN (new or expired zone)

parent 8b9fe86b
......@@ -93,8 +93,10 @@ static int ds_query_consume(knot_layer_t *layer, knot_pkt_t *pkt)
struct ds_query_data *data = layer->data;
data->result_logged = true;
if (knot_pkt_ext_rcode(pkt) != KNOT_RCODE_NOERROR) {
ns_log(LOG_WARNING, data->zone_name, LOG_OPERATION_PARENT,
uint16_t rcode = knot_pkt_ext_rcode(pkt);
if (rcode != KNOT_RCODE_NOERROR) {
ns_log((rcode == KNOT_RCODE_NXDOMAIN ? LOG_NOTICE : LOG_WARNING),
data->zone_name, LOG_OPERATION_PARENT,
LOG_DIRECTION_OUT, data->remote, "failed (%s)", knot_pkt_ext_rcode_name(pkt));
return KNOT_STATE_FAIL;
}
......
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