Use if_link instead of the alias if_list, and change a for() into

the TAILQ_FOREACH() form.

Comment the need to store the same info (mac address for ethernet-type
devices) in two different places.

No functional changes. Even the compiler output should be unmodified
by this change.
This commit is contained in:
luigi 2004-04-16 10:32:13 +00:00
parent ea6500e14f
commit a7f6bd46b9

View File

@ -456,7 +456,7 @@ if_attachdomain(void *dummy)
int s;
s = splnet();
for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list))
TAILQ_FOREACH(ifp, &ifnet, if_link)
if_attachdomain1(ifp);
splx(s);
}
@ -1978,6 +1978,11 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len)
case IFT_ISO88025:
case IFT_L2VLAN:
bcopy(lladdr, ((struct arpcom *)ifp->if_softc)->ac_enaddr, len);
/*
* XXX We also need to store the lladdr in LLADDR(sdl),
* which is done below. This is a pain because we must
* remember to keep the info in sync.
*/
/* FALLTHROUGH */
case IFT_ARCNET:
bcopy(lladdr, LLADDR(sdl), len);