From 5ee4a60d9ca5ffdf784c5a902eb6e59a091f4c2c Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Tue, 4 Oct 2016 14:04:20 +0000 Subject: 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@ --- sys/netinet6/in6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet6/in6.c') 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); } -- cgit v1.2.3