Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 select default router again, when L2 address of...



details:   https://anonhg.NetBSD.org/src/rev/05e1bda3d131
branches:  trunk
changeset: 511604:05e1bda3d131
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jun 22 13:36:12 2001 +0000

description:
select default router again, when L2 address of the router changes

diffstat:

 sys/netinet6/nd6.c |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r a561284b2880 -r 05e1bda3d131 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Fri Jun 22 13:25:03 2001 +0000
+++ b/sys/netinet6/nd6.c        Fri Jun 22 13:36:12 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: nd6.c,v 1.46 2001/05/24 08:17:22 itojun Exp $  */
-/*     $KAME: nd6.c,v 1.137 2001/03/21 21:52:06 jinmei Exp $   */
+/*     $NetBSD: nd6.c,v 1.47 2001/06/22 13:36:12 itojun Exp $  */
+/*     $KAME: nd6.c,v 1.151 2001/06/19 14:24:41 sumikawa Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1754,6 +1754,21 @@
                break;
        }
 
+       /*
+        * When the link-layer address of a router changes, select the
+        * best router again.  In particular, when the neighbor entry is newly
+        * created, it might affect the selection policy.
+        * Question: can we restrict the first condition to the "is_newentry"
+        * case?
+        * XXX: when we hear an RA from a new router with the link-layer
+        * address option, defrouter_select() is called twice, since
+        * defrtrlist_update called the function as well.  However, I believe
+        * we can compromise the overhead, since it only happens the first
+        * time.
+        */
+       if (do_update && ln->ln_router)
+               defrouter_select();
+
        return rt;
 }
 



Home | Main Index | Thread Index | Old Index