]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Document why we say some RFC1035 label types are not supported.
authorRoy Marples <roy@marples.name>
Thu, 2 Jul 2015 15:32:30 +0000 (15:32 +0000)
committerRoy Marples <roy@marples.name>
Thu, 2 Jul 2015 15:32:30 +0000 (15:32 +0000)
dhcp-common.c

index 6a988bd148232bf4513ef5da270490cceb53d5fa..8945d9a017a199fffccfb1c647ab1939f8cc1550 100644 (file)
@@ -289,8 +289,13 @@ decode_rfc3397(char *out, size_t len, const uint8_t *p, size_t pl)
                 * the name isn't fully qualified (ie, not terminated) */
                while (q < e && (l = (size_t)*q++)) {
                        ltype = l & 0xc0;
-                       if (ltype == 0x80 || ltype == 0x40)
+                       if (ltype == 0x80 || ltype == 0x40) {
+                               /* Currently reserved for future use as noted
+                                * in RFC1035 4.1.4 as the 10 and 01
+                                * combinations. */
+                               errno = ENOTSUP;
                                return -1;
+                       }
                        else if (ltype == 0xc0) { /* pointer */
                                if (q == e) {
                                        errno = ERANGE;