From 9046571f1cef8c774a88f5c89964776fe6707dce Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Fri, 16 Apr 2004 10:32:13 +0000 Subject: 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. --- sys/net/if.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/net/if.c b/sys/net/if.c index 534bdcfec72e3..5769129316584 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -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); -- cgit v1.3