From a49f87d13c19deac6e87761b349d96038b3acdfc Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Fri, 22 Jun 2001 14:12:37 +0000 Subject: re-select default router on linklayer addrss changes. sync with kame. --- sys/netinet6/nd6.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 394dcbb5029..bc43199e18c 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,5 +1,5 @@ -/* $OpenBSD: nd6.c,v 1.34 2001/06/09 06:43:38 angelos Exp $ */ -/* $KAME: nd6.c,v 1.137 2001/03/21 21:52:06 jinmei Exp $ */ +/* $OpenBSD: nd6.c,v 1.35 2001/06/22 14:12:36 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. @@ -1745,6 +1745,21 @@ fail: 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; } -- cgit v1.2.3