Change .8s port name restriction to .15s.

This change corresponds to inet.c 1.13.

MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2008-03-18 15:04:05 +00:00
parent 07f7fccaaf
commit bd2327cd5e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177352

View File

@ -1103,7 +1103,7 @@ inet6print(struct in6_addr *in6, int port, const char *proto, int numeric)
if (!numeric && port)
GETSERVBYPORT6(port, proto, sp);
if (sp || port == 0)
sprintf(cp, "%.8s", sp ? sp->s_name : "*");
sprintf(cp, "%.15s", sp ? sp->s_name : "*");
else
sprintf(cp, "%d", ntohs((u_short)port));
width = Wflag ? 45 : Aflag ? 18 : 22;