summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-10-04 14:04:20 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-10-04 14:04:20 +0000
commit5ee4a60d9ca5ffdf784c5a902eb6e59a091f4c2c (patch)
tree205e404b2492b2307e5d5a5d43ecbaea20b442e5 /sys/netinet6
parent370f913d0b1d1dab762adaf604981e48b95c9df7 (diff)
Correct the flag checks inside rt_ifa_addlocal(9) and rt_ifa_dellocal(9).
There's no need to insert an RTF_LOCAL route if it is already there, not if a route with the same destination exist. This fixes a KASSERT() triggered by adding an alias for an address already present in the ARP cache as reported by weerd@ and Peter J. Philipp. This should also fix a KASSERT() triggered by a NDP change reported by Sebastien Marie. ok bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 941e3640dee..55d8d98f79d 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.193 2016/10/03 12:33:21 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.194 2016/10/04 14:04:19 mpi Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -1217,7 +1217,7 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia6, int newhost)
}
if (newhost)
- rt_ifa_addlocal(&(ia6->ia_ifa));
+ error = rt_ifa_addlocal(&(ia6->ia_ifa));
return (error);
}