summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2004-04-16 10:32:13 +0000
committerluigi <luigi@FreeBSD.org>2004-04-16 10:32:13 +0000
commita7f6bd46b91734296d496e965f490fd3b8509d3d (patch)
treee69e29f43bb3dae2e8937aad4ea76e8430ca9a2e /sys/net
parentea6500e14f579d261f82752639bdf3e577fc5c30 (diff)
downloadFreeBSD-src-a7f6bd46b91734296d496e965f490fd3b8509d3d.zip
FreeBSD-src-a7f6bd46b91734296d496e965f490fd3b8509d3d.tar.gz
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.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 534bdcf..5769129 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);
OpenPOWER on IntegriCloud