diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-12-01 10:03:54 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-12-01 10:03:54 +0000 |
commit | f5bf1129c7f778e9d4486d80029f558979fddf52 (patch) | |
tree | 736ffd85b0987f169c312cdb2830e3ff14dab3d1 | |
parent | 01b3f3a5fd053fba2994ac8e0233430eba46f632 (diff) |
Remove "just for safety" over engineering checks.
ifa->ifa_addr must not be NULL when an ifa is on a per-interface list of
addresses.
ok bluhm@, sthen@, benno@, millert@
-rw-r--r-- | sys/netinet6/in6.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index bfc18499ec8..6e4534c23a6 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.179 2015/11/18 13:58:02 mpi Exp $ */ +/* $OpenBSD: in6.c,v 1.180 2015/12/01 10:03:53 mpi Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -1223,8 +1223,6 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia6, int newhost) * and to validate the address if necessary. */ TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { - if (ifa->ifa_addr == NULL) - continue; /* just for safety */ if (ifa->ifa_addr->sa_family != AF_INET6) continue; ifacount++; @@ -1411,8 +1409,6 @@ in6ifa_ifpforlinklocal(struct ifnet *ifp, int ignoreflags) struct ifaddr *ifa; TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { - if (ifa->ifa_addr == NULL) - continue; /* just for safety */ if (ifa->ifa_addr->sa_family != AF_INET6) continue; if (IN6_IS_ADDR_LINKLOCAL(IFA_IN6(ifa))) { @@ -1435,8 +1431,6 @@ in6ifa_ifpwithaddr(struct ifnet *ifp, struct in6_addr *addr) struct ifaddr *ifa; TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { - if (ifa->ifa_addr == NULL) - continue; /* just for safety */ if (ifa->ifa_addr->sa_family != AF_INET6) continue; if (IN6_ARE_ADDR_EQUAL(addr, IFA_IN6(ifa))) |