summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-16 04:51:31 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-16 04:51:31 +0000
commita6364db84d243a698c27f99054be362165406107 (patch)
tree4eb5dba466bf0f96b38cefcb3309c4d2990c2846 /sys
parentd3c2049eb16f6e04446f8fbe34f56b4dd5f63151 (diff)
Get the index in the ifnet_addrs array right (as if_index is
pre-incremented on assignment in net/if.c)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pcmcia/if_wi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c
index 2f83b1766f5..bffaec2c243 100644
--- a/sys/dev/pcmcia/if_wi.c
+++ b/sys/dev/pcmcia/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.5 1999/12/15 21:49:07 angelos Exp $ */
+/* $OpenBSD: if_wi.c,v 1.6 1999/12/16 04:51:30 angelos Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -177,9 +177,9 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint)
static const char rcsid[] =
#ifdef __FreeBSD__
- "$Id: if_wi.c,v 1.5 1999/12/15 21:49:07 angelos Exp $";
+ "$Id: if_wi.c,v 1.6 1999/12/16 04:51:30 angelos Exp $";
#else /* !__FreeBSD__ */
- "$OpenBSD: if_wi.c,v 1.5 1999/12/15 21:49:07 angelos Exp $";
+ "$OpenBSD: if_wi.c,v 1.6 1999/12/16 04:51:30 angelos Exp $";
#endif /* __FreeBSD__ */
#endif /* lint */
@@ -1261,11 +1261,11 @@ STATIC void wi_setdef(sc, wreq)
switch(wreq->wi_type) {
case WI_RID_MAC_NODE:
- ifa = ifnet_addrs[ifp->if_index - 1];
+ ifa = ifnet_addrs[ifp->if_index];
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
bcopy((char *)&wreq->wi_val, LLADDR(sdl), ETHER_ADDR_LEN);
bcopy((char *)&wreq->wi_val, (char *)&sc->arpcom.ac_enaddr,
- ETHER_ADDR_LEN);
+ ETHER_ADDR_LEN);
break;
case WI_RID_PORTTYPE:
sc->wi_ptype = wreq->wi_val[0];