Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached

This commit is contained in:
Ondřej Surý 2018-11-07 15:00:07 +07:00
parent b992b5b811
commit 23fff6c569
53 changed files with 284 additions and 131 deletions

View file

@ -282,8 +282,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
@ -300,8 +302,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
@ -327,8 +331,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
@ -345,8 +351,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
@ -366,8 +374,10 @@ configure_zone(const char *vclass, const char *view,
zone_options |= DNS_ZONEOPT_CHECKSPF;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKSPF;
}
@ -383,8 +393,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKNAMES;
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
@ -394,14 +406,16 @@ configure_zone(const char *vclass, const char *view,
fmtobj = NULL;
if (get_maps(maps, "masterfile-format", &fmtobj)) {
const char *masterformatstr = cfg_obj_asstring(fmtobj);
if (strcasecmp(masterformatstr, "text") == 0)
if (strcasecmp(masterformatstr, "text") == 0) {
masterformat = dns_masterformat_text;
else if (strcasecmp(masterformatstr, "raw") == 0)
} else if (strcasecmp(masterformatstr, "raw") == 0) {
masterformat = dns_masterformat_raw;
else if (strcasecmp(masterformatstr, "map") == 0)
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;

View file

@ -139,12 +139,14 @@ main(int argc, char **argv) {
#define PROGCMP(X) \
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
if (PROGCMP("named-checkzone"))
if (PROGCMP("named-checkzone")) {
progmode = progmode_check;
else if (PROGCMP("named-compilezone"))
} else if (PROGCMP("named-compilezone")) {
progmode = progmode_compile;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
/* Compilation specific defaults */
if (progmode == progmode_compile) {

View file

@ -125,10 +125,12 @@ main(int argc, char **argv) {
if (PROGCMP("tsig-keygen")) {
progmode = progmode_keygen;
quiet = true;
} else if (PROGCMP("ddns-confgen"))
} else if (PROGCMP("ddns-confgen")) {
progmode = progmode_confgen;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
isc_commandline_errprint = false;

View file

@ -1224,6 +1224,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
/* NOTREACHED */
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (strlen(option) > 1U)
option = &option[1];

View file

@ -2348,6 +2348,7 @@ setup_lookup(dig_lookup_t *lookup) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));

View file

@ -457,6 +457,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
ztype = dns_zone_redirect;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
return (ztype);
}
@ -1029,6 +1030,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
if (typep != NULL)

View file

@ -157,6 +157,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
type = ISC_LOG_TOFILE;

View file

@ -1145,6 +1145,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
sa = *(cfg_obj_assockaddr(obj));
@ -1166,6 +1167,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (result != ISC_R_SUCCESS)
return (ISC_R_SUCCESS);
@ -1273,20 +1275,22 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
obj = cfg_tuple_get(ent, "ordering");
INSIST(cfg_obj_isstring(obj));
str = cfg_obj_asstring(obj);
if (!strcasecmp(str, "fixed"))
if (!strcasecmp(str, "fixed")) {
#if DNS_RDATASET_FIXED
mode = DNS_RDATASETATTR_FIXEDORDER;
#else
mode = DNS_RDATASETATTR_CYCLIC;
#endif /* DNS_RDATASET_FIXED */
else if (!strcasecmp(str, "random"))
} else if (!strcasecmp(str, "random")) {
mode = DNS_RDATASETATTR_RANDOMIZE;
else if (!strcasecmp(str, "cyclic"))
} else if (!strcasecmp(str, "cyclic")) {
mode = DNS_RDATASETATTR_CYCLIC;
else if (!strcasecmp(str, "none"))
} else if (!strcasecmp(str, "none")) {
mode = DNS_RDATASETATTR_NONE;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
/*
* "*" should match everything including the root (BIND 8 compat).
@ -1418,14 +1422,16 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
(void)cfg_map_get(cpeer, "transfer-format", &obj);
if (obj != NULL) {
str = cfg_obj_asstring(obj);
if (strcasecmp(str, "many-answers") == 0)
if (strcasecmp(str, "many-answers") == 0) {
CHECK(dns_peer_settransferformat(peer,
dns_many_answers));
else if (strcasecmp(str, "one-answer") == 0)
} else if (strcasecmp(str, "one-answer") == 0) {
CHECK(dns_peer_settransferformat(peer,
dns_one_answer));
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@ -3943,8 +3949,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->checknames = false;
} else if (strcasecmp(str, "ignore") == 0) {
view->checknames = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
obj = NULL;
result = named_config_get(maps, "zero-no-soa-ttl-cache", &obj);
@ -4358,12 +4366,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
const char *resp = cfg_obj_asstring(obj2);
isc_result_t r = DNS_R_SERVFAIL;
if (strcasecmp(resp, "drop") == 0)
if (strcasecmp(resp, "drop") == 0) {
r = DNS_R_DROP;
else if (strcasecmp(resp, "fail") == 0)
} else if (strcasecmp(resp, "fail") == 0) {
r = DNS_R_SERVFAIL;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_resolver_setquotaresponse(view->resolver,
dns_quotatype_server, r);
@ -4709,20 +4719,24 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->minimalresponses = dns_minimal_noauth;
} else if (strcasecmp(str, "no-auth-recursive") == 0) {
view->minimalresponses = dns_minimal_noauthrec;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
result = named_config_get(maps, "transfer-format", &obj);
INSIST(result == ISC_R_SUCCESS);
str = cfg_obj_asstring(obj);
if (strcasecmp(str, "many-answers") == 0)
if (strcasecmp(str, "many-answers") == 0) {
view->transfer_format = dns_many_answers;
else if (strcasecmp(str, "one-answer") == 0)
} else if (strcasecmp(str, "one-answer") == 0) {
view->transfer_format = dns_one_answer;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
obj = NULL;
result = named_config_get(maps, "trust-anchor-telemetry", &obj);
@ -5038,12 +5052,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
const char *resp = cfg_obj_asstring(obj2);
isc_result_t r = DNS_R_SERVFAIL;
if (strcasecmp(resp, "drop") == 0)
if (strcasecmp(resp, "drop") == 0) {
r = DNS_R_DROP;
else if (strcasecmp(resp, "fail") == 0)
} else if (strcasecmp(resp, "fail") == 0) {
r = DNS_R_SERVFAIL;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_resolver_setquotaresponse(view->resolver,
dns_quotatype_zone, r);
@ -5059,10 +5075,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->v4_aaaa = dns_aaaa_ok;
} else {
const char *v4_aaaastr = cfg_obj_asstring(obj);
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0)
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0) {
view->v4_aaaa = dns_aaaa_break_dnssec;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@ -5075,10 +5093,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->v6_aaaa = dns_aaaa_ok;
} else {
const char *v6_aaaastr = cfg_obj_asstring(obj);
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0)
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0) {
view->v6_aaaa = dns_aaaa_break_dnssec;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
CHECK(configure_view_acl(vconfig, config, named_g_config,
@ -5319,14 +5339,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
statlevel = dns_zonestat_none;
} else {
const char *levelstr = cfg_obj_asstring(obj);
if (strcasecmp(levelstr, "full") == 0)
if (strcasecmp(levelstr, "full") == 0) {
statlevel = dns_zonestat_full;
else if (strcasecmp(levelstr, "terse") == 0)
} else if (strcasecmp(levelstr, "terse") == 0) {
statlevel = dns_zonestat_terse;
else if (strcasecmp(levelstr, "none") == 0)
} else if (strcasecmp(levelstr, "none") == 0) {
statlevel = dns_zonestat_none;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
for (empty = empty_zones[empty_zone];
@ -5686,16 +5708,18 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
"forwarding");
fwdpolicy = dns_fwdpolicy_none;
} else {
if (forwardtype == NULL)
if (forwardtype == NULL) {
fwdpolicy = dns_fwdpolicy_first;
else {
} else {
const char *forwardstr = cfg_obj_asstring(forwardtype);
if (strcasecmp(forwardstr, "first") == 0)
if (strcasecmp(forwardstr, "first") == 0) {
fwdpolicy = dns_fwdpolicy_first;
else if (strcasecmp(forwardstr, "only") == 0)
} else if (strcasecmp(forwardstr, "only") == 0) {
fwdpolicy = dns_fwdpolicy_only;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
}
@ -9001,6 +9025,7 @@ load_configuration(const char *filename, named_server_t *server,
server->sctx->cookiealg = ns_cookiealg_sha256;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
obj = NULL;
@ -12597,12 +12622,14 @@ newzone_parse(named_server_t *server, char *command, dns_view_t **viewp,
isc_buffer_init(&argbuf, command, (unsigned int) strlen(command));
isc_buffer_add(&argbuf, strlen(command));
if (strncasecmp(command, "add", 3) == 0)
if (strncasecmp(command, "add", 3) == 0) {
bn = "addzone";
else if (strncasecmp(command, "mod", 3) == 0)
} else if (strncasecmp(command, "mod", 3) == 0) {
bn = "modzone";
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
/*
* Convert the "addzone" or "modzone" to just "zone", for
@ -14988,6 +15015,7 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (viewtxt != NULL) {

View file

@ -125,7 +125,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
break;
default:
INSIST(0);
return (ISC_R_FAILURE);
ISC_UNREACHABLE();
}
/* First check to see if ACL is defined within the zone */
@ -231,12 +231,14 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
unsigned int i, n;
str = cfg_obj_asstring(mode);
if (strcasecmp(str, "grant") == 0)
if (strcasecmp(str, "grant") == 0) {
grant = true;
else if (strcasecmp(str, "deny") == 0)
} else if (strcasecmp(str, "deny") == 0) {
grant = false;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
str = cfg_obj_asstring(matchtype);
CHECK(dns_ssu_mtypefromstring(str, &mtype));
@ -764,6 +766,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
result = named_checknames_get(maps, zone, objp);
INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
@ -1027,14 +1030,16 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
if (result == ISC_R_SUCCESS) {
const char *masterformatstr = cfg_obj_asstring(obj);
if (strcasecmp(masterformatstr, "text") == 0)
if (strcasecmp(masterformatstr, "text") == 0) {
masterformat = dns_masterformat_text;
else if (strcasecmp(masterformatstr, "raw") == 0)
} else if (strcasecmp(masterformatstr, "raw") == 0) {
masterformat = dns_masterformat_raw;
else if (strcasecmp(masterformatstr, "map") == 0)
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@ -1050,12 +1055,14 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
return (ISC_R_FAILURE);
}
if (strcasecmp(masterstylestr, "full") == 0)
if (strcasecmp(masterstylestr, "full") == 0) {
masterstyle = &dns_master_style_full;
else if (strcasecmp(masterstylestr, "relative") == 0)
} else if (strcasecmp(masterstylestr, "relative") == 0) {
masterstyle = &dns_master_style_default;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@ -1141,16 +1148,18 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
dialup = dns_dialuptype_no;
} else {
const char *dialupstr = cfg_obj_asstring(obj);
if (strcasecmp(dialupstr, "notify") == 0)
if (strcasecmp(dialupstr, "notify") == 0) {
dialup = dns_dialuptype_notify;
else if (strcasecmp(dialupstr, "notify-passive") == 0)
} else if (strcasecmp(dialupstr, "notify-passive") == 0) {
dialup = dns_dialuptype_notifypassive;
else if (strcasecmp(dialupstr, "refresh") == 0)
} else if (strcasecmp(dialupstr, "refresh") == 0) {
dialup = dns_dialuptype_refresh;
else if (strcasecmp(dialupstr, "passive") == 0)
} else if (strcasecmp(dialupstr, "passive") == 0) {
dialup = dns_dialuptype_passive;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
if (raw != NULL)
dns_zone_setdialup(raw, dialup);
@ -1166,14 +1175,16 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
statlevel = dns_zonestat_none;
} else {
const char *levelstr = cfg_obj_asstring(obj);
if (strcasecmp(levelstr, "full") == 0)
if (strcasecmp(levelstr, "full") == 0) {
statlevel = dns_zonestat_full;
else if (strcasecmp(levelstr, "terse") == 0)
} else if (strcasecmp(levelstr, "terse") == 0) {
statlevel = dns_zonestat_terse;
else if (strcasecmp(levelstr, "none") == 0)
} else if (strcasecmp(levelstr, "none") == 0) {
statlevel = dns_zonestat_none;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
dns_zone_setstatlevel(zone, statlevel);
@ -1211,12 +1222,14 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
notifytype = dns_notifytype_no;
} else {
const char *notifystr = cfg_obj_asstring(obj);
if (strcasecmp(notifystr, "explicit") == 0)
if (strcasecmp(notifystr, "explicit") == 0) {
notifytype = dns_notifytype_explicit;
else if (strcasecmp(notifystr, "master-only") == 0)
} else if (strcasecmp(notifystr, "master-only") == 0) {
notifytype = dns_notifytype_masteronly;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
notifytype = process_notifytype(notifytype, ztype, zname,
nodefault);
@ -1374,8 +1387,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
fail = check = true;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
fail = check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
if (raw != NULL) {
dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMES,
check);
@ -1410,8 +1425,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
check = true;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
obj = NULL;
@ -1562,14 +1579,16 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = cfg_map_get(zoptions, "auto-dnssec", &obj);
if (result == ISC_R_SUCCESS) {
const char *arg = cfg_obj_asstring(obj);
if (strcasecmp(arg, "allow") == 0)
if (strcasecmp(arg, "allow") == 0) {
allow = true;
else if (strcasecmp(arg, "maintain") == 0)
} else if (strcasecmp(arg, "maintain") == 0) {
allow = maint = true;
else if (strcasecmp(arg, "off") == 0)
} else if (strcasecmp(arg, "off") == 0) {
;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, maint);
}
@ -1622,8 +1641,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
fail = check = true;
} else if (strcasecmp(dupcheck, "ignore") == 0) {
fail = check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRRFAIL, fail);
@ -1637,8 +1658,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
fail = check = true;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
fail = check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail);
@ -1674,8 +1697,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
warn = ignore = false;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
warn = ignore = true;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNOREMXCNAME, ignore);
@ -1689,8 +1714,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
warn = ignore = false;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
warn = ignore = true;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNORESRVCNAME,
ignore);
@ -1706,13 +1733,15 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = cfg_map_get(zoptions, "dnssec-update-mode", &obj);
if (result == ISC_R_SUCCESS) {
const char *arg = cfg_obj_asstring(obj);
if (strcasecmp(arg, "no-resign") == 0)
if (strcasecmp(arg, "no-resign") == 0) {
dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
true);
else if (strcasecmp(arg, "maintain") == 0)
} else if (strcasecmp(arg, "maintain") == 0) {
;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;

View file

@ -1863,6 +1863,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
for (element2 = cfg_list_first(typelist);
@ -2233,6 +2234,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -2658,14 +2660,16 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
(void)cfg_map_get(zoptions, "masterfile-format", &obj);
if (obj != NULL) {
const char *masterformatstr = cfg_obj_asstring(obj);
if (strcasecmp(masterformatstr, "text") == 0)
if (strcasecmp(masterformatstr, "text") == 0) {
masterformat = dns_masterformat_text;
else if (strcasecmp(masterformatstr, "raw") == 0)
} else if (strcasecmp(masterformatstr, "raw") == 0) {
masterformat = dns_masterformat_raw;
else if (strcasecmp(masterformatstr, "map") == 0)
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
if (masterformat == dns_masterformat_map) {

View file

@ -416,8 +416,8 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
return (dns_geoip_match(reqaddr, env->geoip, &e->geoip_elem));
#endif
default:
/* Should be impossible. */
INSIST(0);
ISC_UNREACHABLE();
}
result = dns_acl_match(reqaddr, reqsigner, inner, env,
@ -593,7 +593,7 @@ dns_acl_isinsecure(const dns_acl_t *a) {
default:
INSIST(0);
return (true);
ISC_UNREACHABLE();
}
}

View file

@ -273,6 +273,7 @@ getudpdispatch(int family, dns_dispatchmgr_t *dispatchmgr,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
attrmask = 0;
attrmask |= DNS_DISPATCHATTR_UDP;
@ -3177,6 +3178,7 @@ dns_client_updaterec(dns_client_updateop_t op, const dns_name_t *owner,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
rdatalist->type = rdata->type;

View file

@ -378,6 +378,7 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (result == ISC_R_SUCCESS) {

View file

@ -908,7 +908,7 @@ free_buffer(dns_dispatch_t *disp, void *buf, unsigned int len) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
}
@ -1577,7 +1577,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
return (ISC_R_SUCCESS);

View file

@ -311,6 +311,7 @@ dns_dnsrps_2policy(librpz_policy_t rps_policy) {
case LIBRPZ_POLICY_DISABLED:
default:
INSIST(0);
ISC_UNREACHABLE();
}
}

View file

@ -1043,6 +1043,7 @@ dns_dt_open(const char *filename, dns_dtmode_t mode, isc_mem_t *mctx,
return (ISC_R_NOTIMPLEMENTED);
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_mem_attach(mctx, &handle->mctx);

View file

@ -285,6 +285,7 @@ country_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (text == NULL)
@ -349,6 +350,7 @@ city_string(GeoIPRecord *record, dns_geoip_subtype_t subtype, int *maxlen) {
return (deconst);
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -437,6 +439,7 @@ static char * region_string(GeoIPRegion *region, dns_geoip_subtype_t subtype, in
return (deconst);
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -807,6 +810,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
default:
INSIST(0);
ISC_UNREACHABLE()
}
return (false);

View file

@ -392,6 +392,7 @@ hmac__get_tag_key(isc_md_type_t type) {
return (TAG_HMACSHA512_KEY);
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -411,6 +412,7 @@ hmac__get_tag_bits(isc_md_type_t type) {
return (TAG_HMACSHA512_BITS);
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -462,6 +464,7 @@ hmac__to_dst_alg(isc_md_type_t type) {
return (DST_ALG_HMACSHA512);
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}

View file

@ -745,6 +745,7 @@ ixfr_order(const void *av, const void *bv) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
switch (b->op) {
@ -758,6 +759,7 @@ ixfr_order(const void *av, const void *bv) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
r = bop - aop;

View file

@ -1494,7 +1494,7 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
result = totext_ctx_init(style, &dctx->tctx);
@ -1634,6 +1634,7 @@ writeheader(dns_dumpctx_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_mem_put(dctx->mctx, buffer.base, buffer.length);

View file

@ -920,8 +920,8 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
}
}
INSIST(0); /* Cannot get here... */
return (ISC_R_UNEXPECTED);
INSIST(0);
ISC_UNREACHABLE();
}
static isc_result_t

View file

@ -569,8 +569,8 @@ openssleddsa_todns(const dst_key_t *key, isc_buffer_t *data) {
return (result);
default:
INSIST(0);
ISC_UNREACHABLE();
}
return (DST_R_OPENSSLFAILURE);
}
static isc_result_t

View file

@ -222,6 +222,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
evp_md_ctx = EVP_MD_CTX_create();
@ -244,6 +245,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) {
@ -481,6 +483,7 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (rsa == NULL || e == NULL || cb == NULL)

View file

@ -206,10 +206,11 @@ dns_peer_new(isc_mem_t *mem, const isc_netaddr_t *addr, dns_peer_t **peerptr) {
prefixlen = 32;
break;
case AF_INET6:
prefixlen = 128;
prefixlen = 128;
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
return (dns_peer_newprefix(mem, addr, prefixlen, peerptr));

View file

@ -112,6 +112,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
rsa = key->keydata.pkey;
@ -247,6 +248,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
PK11_RET(pkcs_C_SignInit,
@ -339,6 +341,7 @@ pkcs11rsa_createctx_verify(dst_key_t *key, unsigned int maxbits,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
rsa = key->keydata.pkey;
@ -406,6 +409,7 @@ pkcs11rsa_createctx_verify(dst_key_t *key, unsigned int maxbits,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
PK11_RET(pkcs_C_VerifyInit,
@ -605,6 +609,7 @@ pkcs11rsa_createctx(dst_key_t *key, dst_context_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
switch (key->key_alg) {
@ -623,6 +628,7 @@ pkcs11rsa_createctx(dst_key_t *key, dst_context_t *dctx) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
pk11_ctx = (pk11_context_t *) isc_mem_get(dctx->mctx,
@ -752,6 +758,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
switch (key->key_alg) {
@ -778,6 +785,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
dgstlen = derlen + hashlen;
INSIST(dgstlen <= sizeof(digest));
@ -993,6 +1001,7 @@ pkcs11rsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
dgstlen = derlen + hashlen;
INSIST(dgstlen <= sizeof(digest));
@ -1184,6 +1193,7 @@ pkcs11rsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
pk11_ctx = (pk11_context_t *) isc_mem_get(key->mctx,

View file

@ -6808,6 +6808,7 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (chainingp != NULL)

View file

@ -268,9 +268,8 @@ dns_rpz_policy2str(dns_rpz_policy_t policy) {
str = "MISS";
break;
default:
str = "";
POST(str);
INSIST(0);
ISC_UNREACHABLE();
}
return (str);
}

View file

@ -465,8 +465,8 @@ get_rate(dns_rrl_t *rrl, dns_rrl_rtype_t rtype) {
return (&rrl->all_per_second);
default:
INSIST(0);
ISC_UNREACHABLE();
}
return (NULL);
}
static int
@ -823,7 +823,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
switch (e->key.s.rtype) {
@ -852,6 +852,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (plural)

View file

@ -1052,7 +1052,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
UNUSED(node);
UNUSED(now);
INSIST(0);
return (ISC_R_UNEXPECTED);
ISC_UNREACHABLE();
}
static void

View file

@ -781,7 +781,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
UNUSED(node);
UNUSED(now);
INSIST(0);
return (ISC_R_UNEXPECTED);
ISC_UNREACHABLE();
}
static void

View file

@ -291,6 +291,7 @@ reverse_from_address(dns_name_t *tcpself, const isc_netaddr_t *tcpaddr) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_buffer_init(&b, buf, strlen(buf));
isc_buffer_add(&b, strlen(buf));
@ -333,6 +334,7 @@ stf_from_address(dns_name_t *stfself, const isc_netaddr_t *tcpaddr) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_buffer_init(&b, buf, strlen(buf));
isc_buffer_add(&b, strlen(buf));

View file

@ -98,6 +98,7 @@ dns_tsec_create(isc_mem_t *mctx, dns_tsectype_t type, dst_key_t *key,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
tsec->magic = DNS_TSEC_MAGIC;
@ -123,6 +124,7 @@ dns_tsec_destroy(dns_tsec_t **tsecp) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
tsec->magic = 0;
@ -152,5 +154,6 @@ dns_tsec_getkey(dns_tsec_t *tsec, void *keyp) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
}

View file

@ -1827,6 +1827,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
sigs++;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link);
ISC_LIST_APPEND(state->work.tuples, t, link);
@ -2000,6 +2001,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
sigs++;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link);
ISC_LIST_APPEND(state->work.tuples, t, link);
@ -2026,6 +2028,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
failure:

View file

@ -3704,10 +3704,8 @@ validator_start(isc_task_t *task, isc_event_t *event) {
val->attributes |= VALATTR_NEEDNODATA;
result = nsecvalidate(val, false);
} else {
/*
* This shouldn't happen.
*/
INSIST(0);
ISC_UNREACHABLE();
}
if (result != DNS_R_WAIT) {

View file

@ -625,7 +625,7 @@ xfr_rr(dns_xfrin_ctx_t *xfr, dns_name_t *name, uint32_t ttl,
/* FALLTHROUGH */
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
result = ISC_R_SUCCESS;
failure:

View file

@ -8982,6 +8982,7 @@ normalize_key(dns_rdata_t *rr, dns_rdata_t *target,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
return (ISC_R_SUCCESS);
}
@ -15806,7 +15807,8 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
break;
default:
INSIST(0);
};
ISC_UNREACHABLE();
}
UNLOCK_ZONE(zone);
INSIST(isc_sockaddr_pf(&masteraddr) == isc_sockaddr_pf(&sourceaddr));
result = dns_xfrin_create(zone, xfrtype, &masteraddr, &sourceaddr,
@ -17259,6 +17261,7 @@ dns_zone_setdialup(dns_zone_t *zone, dns_dialuptype_t dialup) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
UNLOCK_ZONE(zone);
}
@ -17334,6 +17337,7 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_read);

View file

@ -196,6 +196,7 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen,
default:
INSIST(0);
ISC_UNREACHABLE();
}
proto = ((flags & NI_DGRAM) != 0) ? "udp" : "tcp";

View file

@ -322,6 +322,7 @@ delete_trace_entry(isc__mem_t *mctx, const void *ptr, size_t size,
* screwed.
*/
INSIST(0);
ISC_UNREACHABLE();
}
#endif /* ISC_MEM_TRACKLINES */
@ -2101,6 +2102,7 @@ isc_mem_checkdestroyed(FILE *file) {
}
#endif
INSIST(0);
ISC_UNREACHABLE();
}
UNLOCK(&contextslock);
}

View file

@ -346,6 +346,7 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) {
#endif
default:
INSIST(0);
ISC_UNREACHABLE();
}
}

View file

@ -282,6 +282,7 @@ isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int pf) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -359,6 +360,7 @@ isc_sockaddr_fromnetaddr(isc_sockaddr_t *sockaddr, const isc_netaddr_t *na,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
ISC_LINK_INIT(sockaddr, link);
}

View file

@ -128,7 +128,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src,
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
}

View file

@ -513,6 +513,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
#endif
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (sendmsg(s, &msg, 0) < 0) {

View file

@ -1587,6 +1587,7 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
case isc_sockettype_fdwatch:
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (sock->type == isc_sockettype_udp) {
@ -2250,7 +2251,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
* sockets.
*/
INSIST(0);
break;
ISC_UNREACHABLE();
}
} else {
sock->fd = dup(dup_socket->fd);
@ -2609,6 +2610,7 @@ socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
sock->pf = pf;

View file

@ -80,7 +80,7 @@ static inline
void
atomic_store_abort() {
INSIST(0);
return;
ISC_UNREACHABLE();
}
#define atomic_store_explicit(obj, desired, order) \
@ -120,7 +120,7 @@ static inline
int8_t
atomic_load_abort() {
INSIST(0);
return (0);
ISC_UNREACHABLE();
}
#define atomic_load_explicit(obj, order) \
@ -160,7 +160,7 @@ static inline
int8_t
atomic_add_abort() {
INSIST(0);
return (0);
ISC_UNREACHABLE();
}
#define atomic_fetch_add_explicit(obj, arg, order) \
@ -247,7 +247,7 @@ static inline
bool
atomic_compare_exchange_abort() {
INSIST(0);
return (false);
ISC_UNREACHABLE();
}
#define atomic_compare_exchange_strong_explicit(obj, expected, desired, \

View file

@ -97,7 +97,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
}

View file

@ -202,6 +202,7 @@ isccc_sexpr_print(isccc_sexpr_t *sexpr, FILE *stream) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
}

View file

@ -389,6 +389,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx,
return (subtype);
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -583,8 +584,10 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
} else if (strcasecmp(stype, "netspeed") == 0) {
subtype = dns_geoip_netspeed_id;
de.geoip_elem.as_int = atoi(search);
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
de.geoip_elem.subtype = get_subtype(obj, lctx, subtype, dbname);

View file

@ -3262,12 +3262,14 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type,
unsigned int have_dscp = 0;
const unsigned int *flagp = type->of;
if ((*flagp & CFG_ADDR_V4OK) != 0)
if ((*flagp & CFG_ADDR_V4OK) != 0) {
isc_netaddr_any(&netaddr);
else if ((*flagp & CFG_ADDR_V6OK) != 0)
} else if ((*flagp & CFG_ADDR_V6OK) != 0) {
isc_netaddr_any6(&netaddr);
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
for (;;) {
CHECK(cfg_peektoken(pctx, 0));
@ -3355,6 +3357,7 @@ doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) {
cfg_print_cstr(pctx, "<ipv6_address>");
} else {
INSIST(0);
ISC_UNREACHABLE();
}
cfg_print_cstr(pctx, " | * ) [ port ( <integer> | * ) ] ) | "
"( [ [ address ] ( ");
@ -3364,6 +3367,7 @@ doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) {
cfg_print_cstr(pctx, "<ipv6_address>");
} else {
INSIST(0);
ISC_UNREACHABLE();
}
cfg_print_cstr(pctx, " | * ) ] port ( <integer> | * ) ) )"
" [ dscp <integer> ]");
@ -4155,6 +4159,7 @@ cfg_print_zonegrammar(const unsigned int zonetype,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
for (clause = clauses; clause->name != NULL; clause++) {

View file

@ -368,7 +368,7 @@ cfg_tuple_get(const cfg_obj_t *tupleobj, const char* name) {
return (tupleobj->value.tuple[i]);
}
INSIST(0);
return (NULL);
ISC_UNREACHABLE();
}
isc_result_t
@ -1982,6 +1982,7 @@ cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) {
; /* do nothing */
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
}
@ -2297,6 +2298,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
return (ISC_R_SUCCESS);
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
if ((flags & (CFG_ADDR_V4OK | CFG_ADDR_V4PREFIXOK)) != 0) {
@ -2571,7 +2573,7 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type,
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
CHECK(cfg_peektoken(pctx, 0));
if (pctx->token.type == isc_tokentype_special &&

View file

@ -645,6 +645,7 @@ exit_check(ns_client_t *client) {
{
isc_mem_stats(client->mctx, stderr);
INSIST(0);
ISC_UNREACHABLE();
}
/*
@ -1269,7 +1270,7 @@ client_send(ns_client_t *client) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
} else {
#ifdef HAVE_DNSTAP
@ -1300,7 +1301,7 @@ client_send(ns_client_t *client) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
}
@ -1712,6 +1713,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_buffer_init(&buf, ecs, sizeof(ecs));
@ -1857,6 +1859,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
/*
@ -1872,6 +1875,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
@ -2431,7 +2435,7 @@ ns__client_request(isc_task_t *task, isc_event_t *event) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
} else {
switch (isc_sockaddr_pf(&client->peeraddr)) {
@ -2445,7 +2449,7 @@ ns__client_request(isc_task_t *task, isc_event_t *event) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
}

View file

@ -2637,7 +2637,7 @@ rpz_get_zbits(ns_client_t *client,
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
/*
@ -2861,6 +2861,7 @@ rpz_get_p_name(ns_client_t *client, dns_name_t *p_name,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
/*
@ -3278,6 +3279,7 @@ dnsrps_rewrite_ip(ns_client_t *client, const isc_netaddr_t *netaddr,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
do {
@ -3330,6 +3332,7 @@ dnsrps_rewrite_name(ns_client_t *client, dns_name_t *trig_name,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
dns_name_toregion(trig_name, &r);
@ -6459,6 +6462,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) {
return (ISC_R_COMPLETE);
default:
INSIST(0);
ISC_UNREACHABLE();
}
/*
@ -8281,6 +8285,7 @@ query_nodata(query_ctx_t *qctx, isc_result_t result) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
SAVE(qctx->client->query.dns64_aaaa, qctx->rdataset);
@ -10606,7 +10611,7 @@ query_setup_sortlist(query_ctx_t *qctx) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
}

View file

@ -379,7 +379,7 @@ ns__query_start_test(const ns__query_start_test_params_t *test) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
/*

View file

@ -764,7 +764,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
break;
default:
INSIST(0);
break;
ISC_UNREACHABLE();
}
ns_client_log(client,