summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-06-24 07:48:52 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-06-24 07:48:52 +0000
commit49fd39cc4d322b4c17e7a420de16d1abd086a2ac (patch)
treef7d3de38d9b487118633b0117b3786178bd2f822
parent319451a2d41604cd35b4eec1f35f4d481914632b (diff)
* kame/sys/netinet6/nd6.c (nd6_rtrequest): changed a condition to
decide whether to create an empty llinfo stricter so that a user can manually change the link-layer address of an existing neighbor cache. Pointed out by: KIU Shueng Chuan from kame
-rw-r--r--sys/netinet6/nd6.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 321456b00c5..9ff47cb85ec 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.62 2003/06/24 07:47:54 itojun Exp $ */
+/* $OpenBSD: nd6.c,v 1.63 2003/06/24 07:48:51 itojun Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -1001,12 +1001,13 @@ nd6_rtrequest(req, rt, info)
* SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
* rt->rt_flags |= RTF_CLONING;
*/
- if (rt->rt_flags & (RTF_CLONING | RTF_LLINFO)) {
+ if ((rt->rt_flags & RTF_CLONING) ||
+ ((rt->rt_flags & RTF_LLINFO) && !ln)) {
/*
- * Case 1: This route should come from
- * a route to interface. RTF_LLINFO flag is set
- * for a host route whose destination should be
- * treated as on-link.
+ * Case 1: This route should come from a route to
+ * interface (RTF_CLONING case) or the route should be
+ * treated as on-link but is currently not
+ * (RTF_LLINFO && !ln case).
*/
rt_setgate(rt, rt_key(rt),
(struct sockaddr *)&null_sdl);