summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-11-01 23:09:15 +0000
committerjulian <julian@FreeBSD.org>2002-11-01 23:09:15 +0000
commit8aff713c1403f9198ff6c9ac9d1d371635af74fb (patch)
treee6b3fa0c867f57cc9597db5685865e9a6a70f74d /sys/netgraph
parent3cb06349962a2f2646cb1ebae052da4298764a40 (diff)
downloadFreeBSD-src-8aff713c1403f9198ff6c9ac9d1d371635af74fb.zip
FreeBSD-src-8aff713c1403f9198ff6c9ac9d1d371635af74fb.tar.gz
ifnet_addrs doesn;t exist any more so use
TAILQ_FIRST(&ifp->if_addrhead) to find the link layer ifaddr. (it's always first I believe) Allows this to compile on -current. .. need testers with FEC capable switches..
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_fec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netgraph/ng_fec.c b/sys/netgraph/ng_fec.c
index 2edca24..5db3033 100644
--- a/sys/netgraph/ng_fec.c
+++ b/sys/netgraph/ng_fec.c
@@ -376,7 +376,7 @@ ng_fec_addport(struct ng_fec_private *priv, char *iface)
* by extension, all the other ports in the bundle).
*/
if (b->fec_ifcnt == 0) {
- ifa = ifnet_addrs[ifp->if_index - 1];
+ ifa = TAILQ_FIRST(&ifp->if_addrhead);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
bcopy((char *)ac->ac_enaddr,
priv->arpcom.ac_enaddr, ETHER_ADDR_LEN);
@@ -393,7 +393,7 @@ ng_fec_addport(struct ng_fec_private *priv, char *iface)
(char *)&new->fec_mac, ETHER_ADDR_LEN);
/* Set up phony MAC address. */
- ifa = ifnet_addrs[bifp->if_index - 1];
+ ifa = TAILQ_FIRST(&bifp->if_addrhead);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
bcopy(priv->arpcom.ac_enaddr, ac->ac_enaddr, ETHER_ADDR_LEN);
bcopy(priv->arpcom.ac_enaddr, LLADDR(sdl), ETHER_ADDR_LEN);
@@ -446,7 +446,7 @@ ng_fec_delport(struct ng_fec_private *priv, char *iface)
/* Restore MAC address. */
ac = (struct arpcom *)bifp;
- ifa = ifnet_addrs[bifp->if_index - 1];
+ ifa = TAILQ_FIRST(&bifp->if_addrhead);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
bcopy((char *)&p->fec_mac, ac->ac_enaddr, ETHER_ADDR_LEN);
bcopy((char *)&p->fec_mac, LLADDR(sdl), ETHER_ADDR_LEN);
OpenPOWER on IntegriCloud