From: Ted Lemon Date: Thu, 20 Apr 2000 01:34:32 +0000 (+0000) Subject: Look for cached zones before doing a query. X-Git-Tag: V3-BETA-2-PATCH-1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd941782575b87fe90c7384e6c1a8bf22961e7f8;p=thirdparty%2Fdhcp.git Look for cached zones before doing a query. --- diff --git a/minires/res_findzonecut.c b/minires/res_findzonecut.c index 44ef49013..00d38d7c3 100644 --- a/minires/res_findzonecut.c +++ b/minires/res_findzonecut.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_findzonecut.c,v 1.3 2000/02/02 19:59:16 mellon Exp $"; +static const char rcsid[] = "$Id: res_findzonecut.c,v 1.4 2000/04/20 01:34:32 mellon Exp $"; #endif /* not lint */ /* @@ -150,6 +150,10 @@ res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, RES_PRF_AUTH | RES_PRF_ADD; ISC_LIST_INIT(nsrrs); + DPRINTF (("look for a predefined zone statement")); + if ((n = find_cached_zone (dname, class, zname, zsize, addrs, naddrs))) + goto done; + DPRINTF(("get the soa, and see if it has enough glue")); if ((n = get_soa(statp, dname, class, zname, zsize, mname, sizeof mname, &nsrrs)) < 0 ||