Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clarified RTF_CLONING for an interface direct route and rt_ifa->ifa_f…

…lags

of the route entry.
  • Loading branch information...
commit 31191cf983cb7cad4bf1fa2629bc14c5167e0571 1 parent 4d9917b
jinmei authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 kame/sys/netinet6/nd6_rtr.c
View
11 kame/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $KAME: nd6_rtr.c,v 1.100 2001/02/24 17:47:22 jinmei Exp $ */
+/* $KAME: nd6_rtr.c,v 1.101 2001/02/25 10:33:45 jinmei Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1623,9 +1623,14 @@ nd6_prefix_onlink(pr)
bzero(&mask6, sizeof(mask6));
mask6.sin6_len = sizeof(mask6);
mask6.sin6_addr = pr->ndpr_mask;
- rtflags = ifa->ifa_flags | RTF_UP;
- if (!nd6_need_cache(ifp))
+ rtflags = ifa->ifa_flags | RTF_CLONING | RTF_UP;
+ if (nd6_need_cache(ifp)) {
+ /* explicitly set in case ifa_flags does not set the flag. */
+ rtflags |= RTF_CLONING;
+ } else {
+ /* explicitly clear in case ifa_flags sets the flag. */
rtflags &= ~RTF_CLONING;
+ }
error = rtrequest(RTM_ADD, (struct sockaddr *)&pr->ndpr_prefix,
ifa->ifa_addr, (struct sockaddr *)&mask6,
rtflags, &rt);
Please sign in to comment.
Something went wrong with that request. Please try again.