Commit 573b33b6 authored by Mark Andrews's avatar Mark Andrews Committed by Evan Hunt

check insist on every call; make conditional block constistent with rest of code

(cherry picked from commit f1def916)
parent 8bd3a1c7
......@@ -3878,6 +3878,10 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
rpz_ver = rpzs->rpz_ver;
RWUNLOCK(&rpzs->search_lock, isc_rwlocktype_read);
#ifndef USE_DNSRPS
INSIST(!popt.dnsrps_enabled);
#endif
if (st == NULL) {
st = isc_mem_get(client->mctx, sizeof(*st));
if (st == NULL)
......@@ -3903,8 +3907,8 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
st->popt = popt;
st->rpz_ver = rpz_ver;
client->query.rpz_st = st;
if (popt.dnsrps_enabled) {
#ifdef USE_DNSRPS
if (popt.dnsrps_enabled) {
if (st->rpsdb != NULL) {
dns_db_detach(&st->rpsdb);
}
......@@ -3919,10 +3923,8 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
st->m.policy = DNS_RPZ_POLICY_ERROR;
return (ISC_R_SUCCESS);
}
#else
INSIST(0);
#endif
}
#endif
}
/*
......
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