During testing it was sending me SERVFAIL, which was weird.
There's no use case so far, but if it was decided to drop the answer,
it should really happen regardless of the transport.
{
#if ENABLE_XDP
struct request_ctx *ctx = task->ctx;
- if (unlikely(ctx->req.answer == NULL)) /* meant to be dropped */
- return kr_ok();
knot_xdp_msg_t msg;
const struct sockaddr *ip_from = &ctx->source.dst_addr.ip;
const struct sockaddr *ip_to = &ctx->source.addr.ip;
return state == KR_STATE_DONE ? kr_ok() : kr_error(EIO);
}
+ if (unlikely(ctx->req.answer == NULL)) { /* meant to be dropped */
+ (void) qr_task_on_send(task, NULL, kr_ok());
+ return kr_ok();
+ }
+
if (session_flags(source_session)->closing ||
ctx->source.addr.ip.sa_family == AF_UNSPEC)
return kr_error(EINVAL);