mirror of
https://github.com/opnsense/src.git
synced 2026-04-21 22:27:47 -04:00
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
This commit is contained in:
parent
b23e7b410b
commit
554bf4aa86
1 changed files with 18 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue