on icmp6 node information query (FQDN), do not return hostnames with
two dots (like "foo..bar"). 0-length labels are not distinguishable with multiple name replies. Obtained from: KAME MFC after: 10 days
This commit is contained in:
parent
3e617560d9
commit
610be6ce41
@ -1539,8 +1539,12 @@ ni6_nametodns(name, namelen, old)
|
||||
/* result does not fit into mbuf */
|
||||
if (cp + i + 1 >= ep)
|
||||
goto fail;
|
||||
/* DNS label length restriction, RFC1035 page 8 */
|
||||
if (i >= 64)
|
||||
/*
|
||||
* DNS label length restriction, RFC1035 page 8.
|
||||
* "i == 0" case is included here to avoid returning
|
||||
* 0-length label on "foo..bar".
|
||||
*/
|
||||
if (i <= 0 || i >= 64)
|
||||
goto fail;
|
||||
*cp++ = i;
|
||||
bcopy(p, cp, i);
|
||||
|
Loading…
Reference in New Issue
Block a user