For VLAN interfaces, print MAC addresses properly.

(Broken in rev. 1.52.)

PR:		75471
Submitted by:	Jon Simola
MFC after:	3 days
This commit is contained in:
ru 2004-12-24 22:16:38 +00:00
parent ab05481bf9
commit 1f0b9e958a

View File

@ -523,7 +523,8 @@ print_entry(struct sockaddr_dl *sdl,
}
printf("%s (%s) at ", host, inet_ntoa(addr->sin_addr));
if (sdl->sdl_alen) {
if (sdl->sdl_type == IFT_ETHER &&
if ((sdl->sdl_type == IFT_ETHER ||
sdl->sdl_type == IFT_L2VLAN) &&
sdl->sdl_alen == ETHER_ADDR_LEN)
printf("%s", ether_ntoa((struct ether_addr *)LLADDR(sdl)));
else {