summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2010-06-28 16:48:16 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2010-06-28 16:48:16 +0000
commitc9f2b2946683a7949bbe0958b2af0027e3528361 (patch)
tree5adecb0d22bb9217c670d59eeca4c21edd1d1e3b
parent6033817102b60473b773a8dc9afe12a4ae822cc7 (diff)
Allow neighbor discovery for prefixes on interfaces without matching
address. This is necessary when ospf6d has learned a prefix for a directly connected link which is not configured localy. Now neighbor discovery is solely based on the cloning route and not on the address neigborship anymore. ok claudio@
-rw-r--r--sys/netinet6/nd6.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 775953fd70c..a33efa70276 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.84 2010/05/07 13:33:17 claudio Exp $ */
+/* $OpenBSD: nd6.c,v 1.85 2010/06/28 16:48:15 bluhm Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -1021,19 +1021,17 @@ nd6_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
return;
}
- if (req == RTM_RESOLVE &&
- (nd6_need_cache(ifp) == 0 || /* stf case */
- !nd6_is_addr_neighbor((struct sockaddr_in6 *)rt_key(rt), ifp))) {
+ if (req == RTM_RESOLVE && nd6_need_cache(ifp) == 0) {
/*
- * FreeBSD and BSD/OS often make a cloned host route based
- * on a less-specific route (e.g. the default route).
- * If the less specific route does not have a "gateway"
- * (this is the case when the route just goes to a p2p or an
- * stf interface), we'll mistakenly make a neighbor cache for
- * the host route, and will see strange neighbor solicitation
- * for the corresponding destination. In order to avoid the
- * confusion, we check if the destination of the route is
- * a neighbor in terms of neighbor discovery, and stop the
+ * For routing daemons like ospf6d we allow neighbor discovery
+ * based on the cloning route only. This allows us to sent
+ * packets directly into a network without having an address
+ * with matching prefix on the interface. If the cloning
+ * route is used for an stf interface, we would mistakenly
+ * make a neighbor cache for the host route, and would see
+ * strange neighbor solicitation for the corresponding
+ * destination. In order to avoid confusion, we check if the
+ * interface is suitable for neighbor discovery, and stop the
* process if not. Additionally, we remove the LLINFO flag
* so that ndp(8) will not try to get the neighbor information
* of the destination.