From: Roy Marples Date: Thu, 2 Jul 2015 15:32:30 +0000 (+0000) Subject: Document why we say some RFC1035 label types are not supported. X-Git-Tag: v6.9.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3afee65d41bc647e3da7e90e2bf0df05ed2d5fd8;p=thirdparty%2Fdhcpcd.git Document why we say some RFC1035 label types are not supported. --- diff --git a/dhcp-common.c b/dhcp-common.c index 6a988bd1..8945d9a0 100644 --- a/dhcp-common.c +++ b/dhcp-common.c @@ -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;