summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-08-10 13:05:58 +0000
committerbluhm <bluhm@openbsd.org>2017-08-10 13:05:58 +0000
commitad57c59c26b31443aa1107b0c76dd64f86d45b36 (patch)
tree6fe4897b86df749a7d4cb7723bbfe5b2258161d8 /sys/netinet6
parentPrevent userland to modify RTF_LOCAL route entries. (diff)
downloadwireguard-openbsd-ad57c59c26b31443aa1107b0c76dd64f86d45b36.tar.xz
wireguard-openbsd-ad57c59c26b31443aa1107b0c76dd64f86d45b36.zip
Do not invalidate ND for local routes, make it consistent like ARP.
OK mpi@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 3568f81856c..c93413369e4 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.217 2017/08/09 14:36:00 florian Exp $ */
+/* $OpenBSD: nd6.c,v 1.218 2017/08/10 13:05:58 bluhm Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -978,7 +978,8 @@ nd6_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
break;
case RTM_INVALIDATE:
- nd6_invalidate(rt);
+ if (!ISSET(rt->rt_flags, RTF_LOCAL))
+ nd6_invalidate(rt);
break;
}
}