From 271154eafd1111455030abc2997120228be55ef9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 15 Dec 1999 07:28:51 +0000 Subject: [PATCH] dns_message_reply(): copy the question section of notify messages. --- lib/dns/include/dns/message.h | 10 +++++----- lib/dns/message.c | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h index 9a161195e5..9df9657b53 100644 --- a/lib/dns/include/dns/message.h +++ b/lib/dns/include/dns/message.h @@ -771,11 +771,11 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section); * Ensures: * * The message will have a rendering intent. If 'want_question_section' - * is true, the message opcode is query, and the question section is - * present and properly formatted, then the question section will be - * included in the reply. All other sections will be cleared. The QR - * flag will be set, the RD flag will be preserved, and all other flags - * will be cleared. + * is true, the message opcode is query or notify, and the question + * section is present and properly formatted, then the question section + * will be included in the reply. All other sections will be cleared. + * The QR flag will be set, the RD flag will be preserved, and all other + * flags will be cleared. * * Returns: * diff --git a/lib/dns/message.c b/lib/dns/message.c index e69ee22f96..49ca36fc52 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -1918,7 +1918,8 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) { if (!msg->header_ok) return (DNS_R_FORMERR); - if (msg->opcode != dns_opcode_query) + if (msg->opcode != dns_opcode_query && + msg->opcode != dns_opcode_notify) want_question_section = ISC_FALSE; if (want_question_section) { if (!msg->question_ok) -- GitLab