summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-07-04 11:27:24 +0000
committerume <ume@FreeBSD.org>2001-07-04 11:27:24 +0000
commiteb2a428208013bb32cb8d63e0f8ec92d3af14458 (patch)
tree39533bdd42a1434ed93d6fc67581bcd17568ba04
parentd9ff84e96962995905f1e653bc484a7f105d3449 (diff)
downloadFreeBSD-src-eb2a428208013bb32cb8d63e0f8ec92d3af14458.zip
FreeBSD-src-eb2a428208013bb32cb8d63e0f8ec92d3af14458.tar.gz
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. Obtained from: KAME MFC after: 1 week
-rw-r--r--sys/netinet6/nd6.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 35f2ca3..1a6785c 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1785,6 +1785,24 @@ 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.
+ * XXX: although defrouter_select() should not have a bad effect
+ * for those are not autoconfigured hosts, we explicitly avoid such
+ * cases for safety.
+ */
+ if (do_update && ln->ln_router && !ip6_forwarding && ip6_accept_rtadv)
+ defrouter_select();
+
return rt;
}
OpenPOWER on IntegriCloud