correct ping6 -w result wth hostname with [A-Z]. PR 17540. sync w/kame

This commit is contained in:
itojun 2002-07-10 05:05:01 +00:00
parent c061e6bf8b
commit 51bd9285d5

View File

@ -1,4 +1,4 @@
/* $NetBSD: icmp6.c,v 1.83 2002/06/30 22:40:38 thorpej Exp $ */
/* $NetBSD: icmp6.c,v 1.84 2002/07/10 05:05:01 itojun Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.83 2002/06/30 22:40:38 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.84 2002/07/10 05:05:01 itojun Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -1624,9 +1624,10 @@ ni6_nametodns(name, namelen, old)
while (i > 0) {
if (!isalnum(*p) && *p != '-')
goto fail;
if (isupper(*p))
*cp++ = tolower(*p++);
else
if (isupper(*p)) {
*cp++ = tolower(*p);
p++;
} else
*cp++ = *p++;
i--;
}