summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/an/if_an.c2
-rw-r--r--sys/dev/wi/if_wi.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 5f1262b..406be21 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -1001,7 +1001,7 @@ static void an_setdef(sc, areq)
case AN_RID_GENCONFIG:
cfg = (struct an_ltv_genconfig *)areq;
- ifa = ifnet_addrs[ifp->if_index - 1];
+ ifa = ifaddr_byindex(ifp->if_index);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
bcopy((char *)&cfg->an_macaddr, (char *)&sc->arpcom.ac_enaddr,
ETHER_ADDR_LEN);
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index cf9114d..9c7230f 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -1293,7 +1293,7 @@ static void wi_setdef(sc, wreq)
switch(wreq->wi_type) {
case WI_RID_MAC_NODE:
- ifa = ifnet_addrs[ifp->if_index - 1];
+ ifa = ifaddr_byindex(ifp->if_index);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
bcopy((char *)&wreq->wi_val, (char *)&sc->arpcom.ac_enaddr,
ETHER_ADDR_LEN);
OpenPOWER on IntegriCloud