mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 08:20:01 -04:00
Remove reduntant checks of 'rdclass' in catz.c
We check the `rdclass` to be of type IN in `dns_catz_update_process()`
function, and all the other static functions where similar checks exist
are called after (and in the result of) that function being called,
so they are effectively redundant.
(cherry picked from commit 84d3aba4f3)
This commit is contained in:
parent
a8f9d4e418
commit
2dac9b119a
1 changed files with 4 additions and 16 deletions
|
|
@ -1034,10 +1034,6 @@ catz_process_zones(dns_catz_zone_t *zone, dns_rdataset_t *value,
|
|||
REQUIRE(DNS_RDATASET_VALID(value));
|
||||
REQUIRE(ISC_MAGIC_VALID(name, DNS_NAME_MAGIC));
|
||||
|
||||
if (value->rdclass != dns_rdataclass_in) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (name->labels == 0) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
|
@ -1073,8 +1069,7 @@ catz_process_coo(dns_catz_zone_t *zone, dns_label_t *mhash,
|
|||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (value->rdclass != dns_rdataclass_in ||
|
||||
value->type != dns_rdatatype_ptr) {
|
||||
if (value->type != dns_rdatatype_ptr) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -1145,8 +1140,7 @@ catz_process_zones_entry(dns_catz_zone_t *zone, dns_rdataset_t *value,
|
|||
dns_rdata_ptr_t ptr;
|
||||
dns_catz_entry_t *entry = NULL;
|
||||
|
||||
if (value->rdclass != dns_rdataclass_in ||
|
||||
value->type != dns_rdatatype_ptr) {
|
||||
if (value->type != dns_rdatatype_ptr) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -1211,8 +1205,7 @@ catz_process_version(dns_catz_zone_t *zone, dns_rdataset_t *value) {
|
|||
REQUIRE(DNS_CATZ_ZONE_VALID(zone));
|
||||
REQUIRE(DNS_RDATASET_VALID(value));
|
||||
|
||||
if (value->rdclass != dns_rdataclass_in ||
|
||||
value->type != dns_rdatatype_txt) {
|
||||
if (value->type != dns_rdatatype_txt) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -1311,10 +1304,6 @@ catz_process_primaries(dns_catz_zone_t *zone, dns_ipkeylist_t *ipkl,
|
|||
* - label and IN A/IN AAAA
|
||||
* - label and IN TXT - TSIG key name
|
||||
*/
|
||||
if (value->rdclass != dns_rdataclass_in) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (name->labels > 0) {
|
||||
isc_sockaddr_t sockaddr;
|
||||
size_t i;
|
||||
|
|
@ -1478,8 +1467,7 @@ catz_process_apl(dns_catz_zone_t *zone, isc_buffer_t **aclbp,
|
|||
REQUIRE(DNS_RDATASET_VALID(value));
|
||||
REQUIRE(dns_rdataset_isassociated(value));
|
||||
|
||||
if (value->rdclass != dns_rdataclass_in ||
|
||||
value->type != dns_rdatatype_apl) {
|
||||
if (value->type != dns_rdatatype_apl) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue