diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 3bebc2d8f4ce..5ae8e6557e16 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.136 2007/12/04 10:27:33 dyoung Exp $ */ +/* $NetBSD: in6.c,v 1.137 2007/12/05 23:00:58 dyoung Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.136 2007/12/04 10:27:33 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.137 2007/12/05 23:00:58 dyoung Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -1424,8 +1424,8 @@ in6_purgeif(struct ifnet *ifp) { struct ifaddr *ifa, *nifa; - for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa != NULL; ifa = nifa) { - nifa = TAILQ_NEXT(ifa, ifa_list); + for (ifa = IFADDR_FIRST(ifp); ifa != NULL; ifa = nifa) { + nifa = IFADDR_NEXT(ifa); if (ifa->ifa_addr->sa_family != AF_INET6) continue; in6_purgeaddr(ifa); diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 2ff82b77d02d..29dd9641c22d 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_ifattach.c,v 1.76 2007/12/04 10:27:33 dyoung Exp $ */ +/* $NetBSD: in6_ifattach.c,v 1.77 2007/12/05 23:00:58 dyoung Exp $ */ /* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.76 2007/12/04 10:27:33 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.77 2007/12/05 23:00:58 dyoung Exp $"); #include #include @@ -856,8 +856,8 @@ in6_ifdetach(struct ifnet *ifp) /* XXX this code is duplicated in in6_purgeif() --dyoung */ /* nuke any of IPv6 addresses we have */ - for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa; ifa = next) { - next = TAILQ_NEXT(ifa, ifa_list); + for (ifa = IFADDR_FIRST(ifp); ifa != NULL; ifa = next) { + next = IFADDR_NEXT(ifa); if (ifa->ifa_addr->sa_family != AF_INET6) continue; in6_purgeaddr(ifa); @@ -866,8 +866,8 @@ in6_ifdetach(struct ifnet *ifp) /* XXX isn't this code is redundant, given the above? --dyoung */ /* XXX doesn't this code replicate code in in6_purgeaddr() ? --dyoung */ /* undo everything done by in6_ifattach(), just in case */ - for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa; ifa = next) { - next = TAILQ_NEXT(ifa, ifa_list); + for (ifa = IFADDR_FIRST(ifp); ifa != NULL; ifa = next) { + next = IFADDR_NEXT(ifa); if (ifa->ifa_addr->sa_family != AF_INET6 || !IN6_IS_ADDR_LINKLOCAL(&satosin6(&ifa->ifa_addr)->sin6_addr)) { diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index ba98dcad4f44..44dee89cac1e 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.70 2007/12/04 10:27:34 dyoung Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.71 2007/12/05 23:00:58 dyoung Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.70 2007/12/04 10:27:34 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.71 2007/12/05 23:00:58 dyoung Exp $"); #include #include @@ -423,7 +423,7 @@ nd6_rtmsg(int cmd, struct rtentry *rt) info.rti_info[RTAX_NETMASK] = rt_mask(rt); if (rt->rt_ifp) { info.rti_info[RTAX_IFP] = - TAILQ_FIRST(&rt->rt_ifp->if_addrlist)->ifa_addr; + IFADDR_FIRST(rt->rt_ifp)->ifa_addr; info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr; } diff --git a/sys/netiso/iso.c b/sys/netiso/iso.c index 94c02715051e..2ef969b023f2 100644 --- a/sys/netiso/iso.c +++ b/sys/netiso/iso.c @@ -1,4 +1,4 @@ -/* $NetBSD: iso.c,v 1.45 2007/12/05 01:20:01 dyoung Exp $ */ +/* $NetBSD: iso.c,v 1.46 2007/12/05 23:02:51 dyoung Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -95,7 +95,7 @@ SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: iso.c,v 1.45 2007/12/05 01:20:01 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iso.c,v 1.46 2007/12/05 23:02:51 dyoung Exp $"); #include #include @@ -620,8 +620,8 @@ iso_purgeif(struct ifnet *ifp) { struct ifaddr *ifa, *nifa; - for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa != NULL; ifa = nifa) { - nifa = TAILQ_NEXT(ifa, ifa_list); + for (ifa = IFADDR_FIRST(ifp); ifa != NULL; ifa = nifa) { + nifa = IFADDR_NEXT(ifa); if (ifa->ifa_addr->sa_family != AF_ISO) continue; iso_purgeaddr(ifa, ifp);