diff options
author | dougb <dougb@FreeBSD.org> | 2003-11-28 21:58:43 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2003-11-28 21:58:43 +0000 |
commit | c753941a76338efc8e7fe025ef3f28abf17b020c (patch) | |
tree | 39734e6a84351fdc07375bb453e7112f31a78d6e /contrib/bind/bin/named | |
parent | c22fdb1a5b1c27a59124bca24ad31d81e276dd14 (diff) | |
parent | 953a80dc6f3a4fff16c0a8cc56fcd49e74b24dbb (diff) | |
download | FreeBSD-src-c753941a76338efc8e7fe025ef3f28abf17b020c.zip FreeBSD-src-c753941a76338efc8e7fe025ef3f28abf17b020c.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r123036,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bind/bin/named')
-rw-r--r-- | contrib/bind/bin/named/ns_init.c | 2 | ||||
-rw-r--r-- | contrib/bind/bin/named/ns_resp.c | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/contrib/bind/bin/named/ns_init.c b/contrib/bind/bin/named/ns_init.c index a0fce64..8cf0684 100644 --- a/contrib/bind/bin/named/ns_init.c +++ b/contrib/bind/bin/named/ns_init.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static const char sccsid[] = "@(#)ns_init.c 4.38 (Berkeley) 3/21/91"; -static const char rcsid[] = "$Id: ns_init.c,v 8.77 2002/08/20 04:27:23 marka Exp $"; +static const char rcsid[] = "$Id: ns_init.c,v 8.77.8.2 2003/09/04 04:09:09 marka Exp $"; #endif /* not lint */ /* diff --git a/contrib/bind/bin/named/ns_resp.c b/contrib/bind/bin/named/ns_resp.c index 0174f9f..7bc166a 100644 --- a/contrib/bind/bin/named/ns_resp.c +++ b/contrib/bind/bin/named/ns_resp.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static const char sccsid[] = "@(#)ns_resp.c 4.65 (Berkeley) 3/3/91"; -static const char rcsid[] = "$Id: ns_resp.c,v 8.186.6.4 2003/06/02 09:56:35 marka Exp $"; +static const char rcsid[] = "$Id: ns_resp.c,v 8.186.6.5 2003/09/04 03:03:18 marka Exp $"; #endif /* not lint */ /* @@ -271,7 +271,7 @@ ns_resp(u_char *msg, int msglen, struct sockaddr_in from, struct qstream *qsp) int soacount; u_int qtype, qclass; int validanswer, dbflags; - int cname, lastwascname, externalcname; + int cname, lastwascname, externalcname, cachenegative; int count, founddata, foundname; int buflen; int newmsglen; @@ -911,6 +911,7 @@ tcp_retry: cname = 0; lastwascname = 0; externalcname = 0; + cachenegative = 1; strcpy(aname, qname); if (count) { @@ -980,6 +981,7 @@ tcp_retry: name); db_detach(&dp); validanswer = 0; + cachenegative = 0; continue; } if (type == T_CNAME && @@ -1014,6 +1016,7 @@ tcp_retry: "last was cname, ignoring auth. and add."); db_detach(&dp); validanswer = 0; + cachenegative = 0; break; } if (i < arfirst) { @@ -1029,6 +1032,7 @@ tcp_retry: sin_ntoa(from)); db_detach(&dp); validanswer = 0; + cachenegative = 0; continue; } else if (!ns_samedomain(name, qp->q_domain)) { @@ -1042,6 +1046,7 @@ tcp_retry: sin_ntoa(from)); db_detach(&dp); validanswer = 0; + cachenegative = 0; continue; } if (type == T_NS) { @@ -1205,8 +1210,9 @@ tcp_retry: ) ) { - cache_n_resp(msg, msglen, from, qp->q_name, - qp->q_class, qp->q_type); + if (cachenegative) + cache_n_resp(msg, msglen, from, qp->q_name, + qp->q_class, qp->q_type); if (!qp->q_cmsglen && validanswer) { ns_debug(ns_log_default, 3, |