1 From 06568c663643b9ed1577d95efee69d734f427cf5 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Fri, 15 May 2015 20:43:48 +0100
4 Subject: [PATCH 096/113] Remove support for DNS Extended Label Types.
6 The support was only partial, and the whole concept is
7 now deprecated in the standards.
9 src/rfc1035.c | 52 ++++------------------------------------------------
10 1 file changed, 4 insertions(+), 48 deletions(-)
12 diff --git a/src/rfc1035.c b/src/rfc1035.c
13 index a95241f83523..56647b02ab4d 100644
16 @@ -77,53 +77,7 @@ int extract_name(struct dns_header *header, size_t plen, unsigned char **pp,
18 p = l + (unsigned char *)header;
20 - else if (label_type == 0x80)
21 - return 0; /* reserved */
22 - else if (label_type == 0x40)
24 - unsigned int count, digs;
26 - if ((l & 0x3f) != 1)
27 - return 0; /* we only understand bitstrings */
30 - return 0; /* Cannot compare bitsrings */
35 - digs = ((count-1)>>2)+1;
37 - /* output is \[x<hex>/siz]. which is digs+7/8/9 chars */
43 - if (namelen+1 >= MAXDNAME)
46 - if (!CHECK_LEN(header, p, plen, (count-1)>>3))
52 - for (j=0; j<digs; j++)
60 - *cp++ = dig < 10 ? dig + '0' : dig + 'A' - 10;
62 - cp += sprintf((char *)cp, "/%d]", count);
63 - /* do this here to overwrite the zero char from sprintf */
67 + else if (label_type == 0x00)
68 { /* label_type = 0 -> label. */
69 namelen += l + 1; /* include period */
70 if (namelen >= MAXDNAME)
71 @@ -176,12 +130,14 @@ int extract_name(struct dns_header *header, size_t plen, unsigned char **pp,
79 else if (*cp != 0 && *cp++ != '.')
83 + return 0; /* label types 0x40 and 0x80 not supported */