Add invariant check for delegset in rctx_nextserver()

The get_nameservers path in rctx_nextserver() is only reachable from
rctx_referral(), which already detaches fctx->delegset.  Assert that
it is NULL rather than redundantly detaching it, since
dns_view_bestzonecut() requires *delegsetp == NULL.
This commit is contained in:
Ondřej Surý 2026-03-14 10:10:34 +01:00 committed by Colin Vidal
parent a1cb966944
commit 792d8a74ab

View file

@ -9379,6 +9379,7 @@ rctx_nextserver(respctx_t *rctx, dns_message_t *message,
} else {
name = fctx->domain;
}
INSIST(fctx->delegset == NULL);
result = dns_view_bestzonecut(fctx->res->view, name, fname,
dcname, fctx->now, findoptions,
true, true, &fctx->delegset);