summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_nbr.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2012-01-03 23:41:52 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2012-01-03 23:41:52 +0000
commita788b08e4a13f160295ff1c5ed5f72c192a31c6d (patch)
tree96ea4a06a86ec5229ca9811399a22cc423377398 /sys/netinet6/nd6_nbr.c
parent8390485057fcecbd0fa623e72550abc20f2293e8 (diff)
To access the ifaddr of an in_ifaddr or in6_ifaddr struct, it is
cleaner to access the first member via ia_ifa instead of casting. No binary change. ok henning@ krw@
Diffstat (limited to 'sys/netinet6/nd6_nbr.c')
-rw-r--r--sys/netinet6/nd6_nbr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index e1a497c4c5a..530e239f590 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.60 2011/11/24 17:39:55 sperreault Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.61 2012/01/03 23:41:51 bluhm Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -183,7 +183,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
* We do not add one in MUST NOT cases.
*/
#if 0 /* too much! */
- ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &daddr6);
+ ifa = &in6ifa_ifpwithaddr(ifp, &daddr6)->ia_ifa;
if (ifa && (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_ANYCAST))
tlladdr = 0;
else
@@ -202,14 +202,14 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
/* (1) and (3) check. */
#if NCARP > 0
if (ifp->if_type == IFT_CARP) {
- ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
+ ifa = &in6ifa_ifpwithaddr(ifp, &taddr6)->ia_ifa;
if (ifa && !carp_iamatch6(ifp, lladdr, &proxydl))
ifa = NULL;
} else {
- ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
+ ifa = &in6ifa_ifpwithaddr(ifp, &taddr6)->ia_ifa;
}
#else
- ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
+ ifa = &in6ifa_ifpwithaddr(ifp, &taddr6)->ia_ifa;
#endif
/* (2) check. */
@@ -229,8 +229,8 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
/*
* proxy NDP for single entry
*/
- ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp,
- IN6_IFF_NOTREADY|IN6_IFF_ANYCAST);
+ ifa = &in6ifa_ifpforlinklocal(ifp,
+ IN6_IFF_NOTREADY | IN6_IFF_ANYCAST)->ia_ifa;
if (ifa) {
proxy = 1;
proxydl = SDL(rt->rt_gateway);
@@ -615,7 +615,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;
}
- ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
+ ifa = &in6ifa_ifpwithaddr(ifp, &taddr6)->ia_ifa;
/*
* Target address matches one of my interface address.