Use the length of the interface name, not the length of its address when

printing the name.

Approved by:	brian
This commit is contained in:
Brooks Davis 2004-01-21 22:00:50 +00:00
parent ad836d50cb
commit 772670ea02
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124815

View File

@ -302,7 +302,7 @@ arp_EtherAddr(int s, struct in_addr ipaddr, struct sockaddr_dl *hwaddr,
if ((ifa->sin_addr.s_addr & netmask->sin_addr.s_addr) ==
(ipaddr.s_addr & netmask->sin_addr.s_addr)) {
log_Printf(verbose ? LogPHASE : LogDEBUG,
"Found interface %.*s for %s\n", dl->sdl_alen,
"Found interface %.*s for %s\n", dl->sdl_nlen,
dl->sdl_data, inet_ntoa(ipaddr));
memcpy(hwaddr, dl, dl->sdl_len);
free(buf);