summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-12-08 10:38:49 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-12-08 10:38:49 +0000
commit2d7a13d6f60c3109085d831a03d4dfbd615dc61e (patch)
tree22032ee6c0542c0352a3070e854147b03f676eb3 /sys
parent8d7625af1e95c1412b0e4caeed17ad09b50580f9 (diff)
Do not take into account addresses configured in a different rdomain
to decide whether or not to remove local routes. Prevent from having a NULL ifp pointer in the routing table when an address present in another rdomain is removed from an interface. ok bluhm@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/in6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index d81cae09f7e..4da4f7795c0 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.146 2014/11/24 12:43:54 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.147 2014/12/08 10:38:48 mpi Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -1053,6 +1053,9 @@ in6_purgeaddr(struct ifaddr *ifa)
* XXX: we should avoid such a configuration in IPv6...
*/
TAILQ_FOREACH(tmp, &in6_ifaddr, ia_list) {
+ if (tmp->ia_ifp->if_rdomain != ifp->if_rdomain)
+ continue;
+
if (IN6_ARE_ADDR_EQUAL(&tmp->ia_addr.sin6_addr,
&ia6->ia_addr.sin6_addr)) {
ia6_count++;