Fix AA being cleared on notify "queries"
Submitted by: Mark Andrews <marka@nominum.com>
This commit is contained in:
parent
015944e3a5
commit
8e14eeeb1d
@ -1,6 +1,6 @@
|
|||||||
#if !defined(lint) && !defined(SABER)
|
#if !defined(lint) && !defined(SABER)
|
||||||
static const char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91";
|
static const char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91";
|
||||||
static const char rcsid[] = "$Id: ns_req.c,v 8.118 2000/07/17 07:57:56 vixie Exp $";
|
static const char rcsid[] = "$Id: ns_req.c,v 8.119 2000/08/21 05:57:09 vixie Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -271,7 +271,11 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
|
|||||||
* safely assume these are always 0 when a query
|
* safely assume these are always 0 when a query
|
||||||
* comes in.
|
* comes in.
|
||||||
*/
|
*/
|
||||||
hp->aa = hp->ra = 0;
|
#ifdef BIND_NOTIFY
|
||||||
|
if (hp->opcode != ns_o_notify)
|
||||||
|
#endif
|
||||||
|
hp->aa = 0;
|
||||||
|
hp->ra = 0;
|
||||||
ra = (NS_OPTION_P(OPTION_NORECURSE) == 0);
|
ra = (NS_OPTION_P(OPTION_NORECURSE) == 0);
|
||||||
|
|
||||||
if (error == NOERROR)
|
if (error == NOERROR)
|
||||||
@ -460,18 +464,21 @@ req_notify(HEADER *hp, u_char **cpp, u_char *eom, u_char *msg,
|
|||||||
char dnbuf[MAXDNAME];
|
char dnbuf[MAXDNAME];
|
||||||
struct zoneinfo *zp;
|
struct zoneinfo *zp;
|
||||||
|
|
||||||
/* valid notify's have one question */
|
|
||||||
if (ntohs(hp->qdcount) != 1) {
|
|
||||||
ns_debug(ns_log_notify, 1,
|
|
||||||
"FORMERR Notify header counts wrong");
|
|
||||||
hp->rcode = ns_r_formerr;
|
|
||||||
return (Finish);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* valid notify's are authoritative */
|
/* valid notify's are authoritative */
|
||||||
if (!hp->aa) {
|
if (!hp->aa) {
|
||||||
ns_debug(ns_log_notify, 1,
|
ns_debug(ns_log_notify, 1,
|
||||||
"FORMERR Notify request without AA");
|
"FORMERR Notify request without AA");
|
||||||
|
#ifdef not_yet
|
||||||
|
hp->rcode = ns_r_formerr;
|
||||||
|
return (Finish);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
hp->aa = 0;
|
||||||
|
|
||||||
|
/* valid notify's have one question */
|
||||||
|
if (ntohs(hp->qdcount) != 1) {
|
||||||
|
ns_debug(ns_log_notify, 1,
|
||||||
|
"FORMERR Notify header counts wrong");
|
||||||
hp->rcode = ns_r_formerr;
|
hp->rcode = ns_r_formerr;
|
||||||
return (Finish);
|
return (Finish);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user