diff options
author | Thomas Markwalder <tmark@isc.org> | 2019-11-22 13:39:45 -0500 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2019-11-22 13:39:45 -0500 |
commit | 0cd94b5ef4a078097fc2bd1dc72f5e80c2cf1844 (patch) | |
tree | e4dfe9a92d676a49b18ab547d781fb3fb10c8e6a /common/dns.c | |
parent | 97c155273c0df0c8518f226e2b5e338e3ad63e87 (diff) | |
download | isc-dhcp-0cd94b5ef4a078097fc2bd1dc72f5e80c2cf1844.tar.gz |
[#64,!35] Restored work
Restored cummulative work.
Diffstat (limited to 'common/dns.c')
-rw-r--r-- | common/dns.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/dns.c b/common/dns.c index 5b097b69..bdd8af46 100644 --- a/common/dns.c +++ b/common/dns.c @@ -1246,7 +1246,7 @@ find_cached_zone(dhcp_ddns_cb_t *ddns_cb, int direction) } /* Make sure the zone name will fit. */ - if (strlen(zone->name) > sizeof(ddns_cb->zone_name)) { + if (strlen(zone->name) >= sizeof(ddns_cb->zone_name)) { dns_zone_dereference(&zone, MDL); return (ISC_R_NOSPACE); } @@ -1374,8 +1374,9 @@ void cache_found_zone(dhcp_ddns_ns_t *ns_cb) /* See if there's already such a zone. */ if (dns_zone_lookup(&zone, ns_cb->zname) == ISC_R_SUCCESS) { /* If it's not a dynamic zone, leave it alone. */ - if (zone->timeout == 0) - return; + if (zone->timeout == 0) { + goto cleanup; + } /* Remove any old addresses in case they've changed */ if (zone->primary) |