Commit 21e82177 authored by Brian Wellington's avatar Brian Wellington

make message->rcode a dns_rcode_t

parent e037ca87
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.h,v 1.88 2001/01/09 23:35:33 marka Exp $ */
/* $Id: message.h,v 1.89 2001/01/18 00:26:36 bwelling Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
......@@ -165,7 +165,7 @@ struct dns_message {
dns_messageid_t id;
unsigned int flags;
unsigned int rcode;
dns_rcode_t rcode;
unsigned int opcode;
dns_rdataclass_t rdclass;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.172 2001/01/09 23:35:27 marka Exp $ */
/* $Id: message.c,v 1.173 2001/01/18 00:26:34 bwelling Exp $ */
/***
*** Imports
......@@ -1408,13 +1408,14 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
* the extended rcode.
*/
if (rdtype == dns_rdatatype_opt) {
unsigned int ercode;
dns_rcode_t ercode;
msg->opt = rdataset;
rdataset = NULL;
free_rdataset = ISC_FALSE;
ercode = (msg->opt->ttl & DNS_MESSAGE_EDNSRCODE_MASK)
>> 20;
ercode = (dns_rcode_t)
(msg->opt->ttl & DNS_MESSAGE_EDNSRCODE_MASK)
>> 20;
msg->rcode |= ercode;
isc_mempool_put(msg->namepool, name);
free_name = ISC_FALSE;
......@@ -1487,7 +1488,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
tmpflags = isc_buffer_getuint16(source);
msg->opcode = ((tmpflags & DNS_MESSAGE_OPCODE_MASK)
>> DNS_MESSAGE_OPCODE_SHIFT);
msg->rcode = (tmpflags & DNS_MESSAGE_RCODE_MASK);
msg->rcode = (dns_rcode_t)(tmpflags & DNS_MESSAGE_RCODE_MASK);
msg->flags = (tmpflags & DNS_MESSAGE_FLAG_MASK);
msg->counts[DNS_SECTION_QUESTION] = isc_buffer_getuint16(source);
msg->counts[DNS_SECTION_ANSWER] = isc_buffer_getuint16(source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment