From 0cd94b5ef4a078097fc2bd1dc72f5e80c2cf1844 Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Fri, 22 Nov 2019 13:39:45 -0500 Subject: [#64,!35] Restored work Restored cummulative work. --- common/dns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/dns.c') 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) -- cgit v1.2.1