diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-06-22 14:12:37 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-06-22 14:12:37 +0000 |
commit | a49f87d13c19deac6e87761b349d96038b3acdfc (patch) | |
tree | e43decbaeddd730da5604c1538a8f4935ab314b6 /sys | |
parent | 1f6ba6fa775d3d9dc11b0cf656fb6c455cfb2f98 (diff) |
re-select default router on linklayer addrss changes. sync with kame.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/nd6.c | 19 |
1 files changed, 17 insertions, 2 deletions
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; } |