Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored February 25, 2001

Showing 1 changed file with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. 11  kame/sys/netinet6/nd6_rtr.c
11  kame/sys/netinet6/nd6_rtr.c
... ...
@@ -1,4 +1,4 @@
1  
-/*	$KAME: nd6_rtr.c,v 1.100 2001/02/24 17:47:22 jinmei Exp $	*/
  1
+/*	$KAME: nd6_rtr.c,v 1.101 2001/02/25 10:33:45 jinmei Exp $	*/
2 2
 
3 3
 /*
4 4
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1623,9 +1623,14 @@ nd6_prefix_onlink(pr)
1623 1623
 	bzero(&mask6, sizeof(mask6));
1624 1624
 	mask6.sin6_len = sizeof(mask6);
1625 1625
 	mask6.sin6_addr = pr->ndpr_mask;
1626  
-	rtflags = ifa->ifa_flags | RTF_UP;
1627  
-	if (!nd6_need_cache(ifp))
  1626
+	rtflags = ifa->ifa_flags | RTF_CLONING | RTF_UP;
  1627
+	if (nd6_need_cache(ifp)) {
  1628
+		/* explicitly set in case ifa_flags does not set the flag. */
  1629
+		rtflags |= RTF_CLONING;
  1630
+	} else {
  1631
+		/* explicitly clear in case ifa_flags sets the flag. */
1628 1632
 		rtflags &= ~RTF_CLONING;
  1633
+	}
1629 1634
 	error = rtrequest(RTM_ADD, (struct sockaddr *)&pr->ndpr_prefix,
1630 1635
 			  ifa->ifa_addr, (struct sockaddr *)&mask6,
1631 1636
 			  rtflags, &rt);

0 notes on commit 31191cf

Please sign in to comment.
Something went wrong with that request. Please try again.