From 56f70627286d026ed6b2386007e36fc593e1d584 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sat, 24 Apr 2004 22:11:13 +0000 Subject: [PATCH] arpcom untangling: do not use struct arpcom directly, rather use IFP2AC(ifp). --- sys/net/bridge.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/net/bridge.c b/sys/net/bridge.c index 74f6f0095ec2..5aa72ea807c2 100644 --- a/sys/net/bridge.c +++ b/sys/net/bridge.c @@ -99,15 +99,16 @@ #include #include +#include #include +#include /* for struct arpcom */ #include #include -#include /* for struct arpcom */ +#include #include #include #include -#include /* for struct arpcom */ #ifdef PFIL_HOOKS #include @@ -299,7 +300,7 @@ static struct callout bdg_callout; * updating pointers in ifp2sc. */ static struct cluster_softc * -add_cluster(u_int16_t cluster_id, struct arpcom *ac) +add_cluster(u_int16_t cluster_id, struct ifnet *ifp) { struct cluster_softc *c = NULL; int i; @@ -353,7 +354,7 @@ add_cluster(u_int16_t cluster_id, struct arpcom *ac) n_clusters++; found: c = clusters + i; /* the right cluster ... */ - ETHER_ADDR_COPY(c->my_macs[c->ports].etheraddr, ac->ac_enaddr); + ETHER_ADDR_COPY(c->my_macs[c->ports].etheraddr, IFP2AC(ifp)->ac_enaddr); c->ports++; return c; bad: @@ -532,7 +533,7 @@ parse_bdg_cfg(void) printf("%s already used, skipping\n", ifp->if_xname); break; } - b->cluster = add_cluster(htons(cluster), (struct arpcom *)ifp); + b->cluster = add_cluster(htons(cluster), ifp); b->flags |= IFF_USED ; snprintf(bdg_stats.s[ifp->if_index].name, sizeof(bdg_stats.s[ifp->if_index].name),