diff options
| author | 2020-02-24 16:25:22 +0000 | |
|---|---|---|
| committer | 2020-02-24 16:25:22 +0000 | |
| commit | c707c6a4702cfb44bebfdc3c72cdf3f9871dba86 (patch) | |
| tree | 843778793b4d6e8b3fb50b61e6948199116dcb52 | |
| parent | Fix two security vulnerabilities discovered by Qualys. (diff) | |
| download | wireguard-openbsd-c707c6a4702cfb44bebfdc3c72cdf3f9871dba86.tar.xz wireguard-openbsd-c707c6a4702cfb44bebfdc3c72cdf3f9871dba86.zip | |
We are never required to "render glue first" since we just print what
we get from the net.
| -rw-r--r-- | usr.bin/dig/lib/dns/include/dns/rdataset.h | 4 | ||||
| -rw-r--r-- | usr.bin/dig/lib/dns/message.c | 37 |
2 files changed, 2 insertions, 39 deletions
diff --git a/usr.bin/dig/lib/dns/include/dns/rdataset.h b/usr.bin/dig/lib/dns/include/dns/rdataset.h index 3461a3e33a8..d03c4bbb2e6 100644 --- a/usr.bin/dig/lib/dns/include/dns/rdataset.h +++ b/usr.bin/dig/lib/dns/include/dns/rdataset.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdataset.h,v 1.7 2020/02/23 08:54:33 florian Exp $ */ +/* $Id: rdataset.h,v 1.8 2020/02/24 16:25:22 florian Exp $ */ #ifndef DNS_RDATASET_H #define DNS_RDATASET_H 1 @@ -189,8 +189,6 @@ struct dns_rdataset { #define DNS_RDATASETATTR_NXDOMAIN 0x00002000 #define DNS_RDATASETATTR_NOQNAME 0x00004000 #define DNS_RDATASETATTR_CHECKNAMES 0x00008000 /*%< Used by resolver. */ -#define DNS_RDATASETATTR_REQUIRED 0x00010000 -#define DNS_RDATASETATTR_REQUIREDGLUE DNS_RDATASETATTR_REQUIRED #define DNS_RDATASETATTR_LOADORDER 0x00020000 #define DNS_RDATASETATTR_RESIGN 0x00040000 #define DNS_RDATASETATTR_CLOSEST 0x00080000 diff --git a/usr.bin/dig/lib/dns/message.c b/usr.bin/dig/lib/dns/message.c index 3d92d65e4cb..f24ebe888a2 100644 --- a/usr.bin/dig/lib/dns/message.c +++ b/usr.bin/dig/lib/dns/message.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: message.c,v 1.14 2020/02/24 16:12:29 florian Exp $ */ +/* $Id: message.c,v 1.15 2020/02/24 16:25:22 florian Exp $ */ /*! \file */ @@ -1626,41 +1626,6 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid) total = 0; - /* - * Render required glue first. Set TC if it won't fit. - */ - name = ISC_LIST_HEAD(*section); - if (name != NULL) { - rdataset = ISC_LIST_HEAD(name->list); - if (rdataset != NULL && - (rdataset->attributes & DNS_RDATASETATTR_REQUIREDGLUE) != 0 && - (rdataset->attributes & DNS_RDATASETATTR_RENDERED) == 0) { - const void *order_arg = msg->order_arg; - st = *(msg->buffer); - count = 0; - result = dns_rdataset_towiresorted(rdataset, - name, - msg->cctx, - msg->buffer, - msg->order, - order_arg, - &count); - total += count; - if (result == ISC_R_NOSPACE) - msg->flags |= DNS_MESSAGEFLAG_TC; - if (result != ISC_R_SUCCESS) { - INSIST(st.used < 65536); - dns_compress_rollback(msg->cctx, - (uint16_t)st.used); - *(msg->buffer) = st; /* rollback */ - msg->buffer->length += msg->reserved; - msg->counts[sectionid] += total; - return (result); - } - rdataset->attributes |= DNS_RDATASETATTR_RENDERED; - } - } - do { name = ISC_LIST_HEAD(*section); if (name == NULL) { |
