Don't announce the ethernet address when it's 00:00:00:00:00:00. It's

not of any interest.  This primairly happens when vlan(4) interfaces are
created.
This commit is contained in:
brooks 2004-07-02 19:44:59 +00:00
parent 7f4ea6942f
commit 5b1f1be739

View File

@ -847,6 +847,7 @@ ether_sprintf(const u_char *ap)
void
ether_ifattach(struct ifnet *ifp, const u_int8_t *llc)
{
int i;
struct ifaddr *ifa;
struct sockaddr_dl *sdl;
@ -881,8 +882,12 @@ ether_ifattach(struct ifnet *ifp, const u_int8_t *llc)
if (BDG_LOADED)
bdgtakeifaces_ptr();
/* Announce Ethernet MAC address. */
if_printf(ifp, "Ethernet address: %6D\n", llc, ":");
/* Announce Ethernet MAC address if non-zero. */
for (i = 0; i < ifp->if_addrlen; i++)
if (llc[i] != 0)
break;
if (i != ifp->if_addrlen)
if_printf(ifp, "Ethernet address: %6D\n", llc, ":");
}
/*