summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-12-13 21:29:07 +0000
committerwollman <wollman@FreeBSD.org>1996-12-13 21:29:07 +0000
commit3417f9411098d1cd19c5db539c0768e778b83a1c (patch)
tree782c07e423375f5e3235e7a677261301a91e59c6 /sys/net/if_ethersubr.c
parent4ad813db29ba756a35db6540961c86a4c1f5592b (diff)
downloadFreeBSD-src-3417f9411098d1cd19c5db539c0768e778b83a1c.zip
FreeBSD-src-3417f9411098d1cd19c5db539c0768e778b83a1c.tar.gz
Convert the interface address and IP interface address structures
to TAILQs. Fix places which referenced these for no good reason that I can see (the references remain, but were fixed to compile again; they are still questionable).
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index bdcdde7..3aefabe 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ethersubr.c,v 1.27 1996/11/18 04:55:44 davidg Exp $
+ * $Id: if_ethersubr.c,v 1.28 1996/12/10 07:29:48 davidg Exp $
*/
#include <sys/param.h>
@@ -197,7 +197,7 @@ ether_output(ifp, m0, dst, rt0)
* ifaddr is the first thing in at_ifaddr
*/
if ((aa = (struct at_ifaddr *)at_ifawithnet(
- (struct sockaddr_at *)dst, ifp->if_addrlist))
+ (struct sockaddr_at *)dst, &ifp->if_addrhead))
== 0)
goto bad;
@@ -653,15 +653,15 @@ ether_ifattach(ifp)
ifp->if_mtu = ETHERMTU;
if (ifp->if_baudrate == 0)
ifp->if_baudrate = 10000000;
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) &&
- sdl->sdl_family == AF_LINK) {
- sdl->sdl_type = IFT_ETHER;
- sdl->sdl_alen = ifp->if_addrlen;
- bcopy((caddr_t)((struct arpcom *)ifp)->ac_enaddr,
- LLADDR(sdl), ifp->if_addrlen);
- break;
- }
+ ifa = ifnet_addrs[ifp->if_index - 1];
+ if (ifa == 0) {
+ printf("ether_ifattach: no lladdr!\n");
+ return;
+ }
+ sdl = (struct sockaddr_dl *)ifa->ifa_addr;
+ sdl->sdl_type = IFT_ETHER;
+ sdl->sdl_alen = ifp->if_addrlen;
+ bcopy(((struct arpcom *)ifp)->ac_enaddr, LLADDR(sdl), ifp->if_addrlen);
}
static u_char ether_ipmulticast_min[6] =
OpenPOWER on IntegriCloud