mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 19:30:37 +01:00
ndisc: support multiple gateways for a single network
Also check for gateway equality when deduplicate routing entries. This allows to support multiple routes to the same network using different gateways. This is useful for Thread networks where multiple BRs route to the same Thread network. If one of these BRs go offline, fallback to a different router will be much quicker if multiple entries are present. Note that quick fallback to a different router requires IPv6 reachability probe to be active. Typically Linux disables reachability probes on Linux machines which act as IPv6 gateway (when forwarding is enabled).
This commit is contained in:
parent
7be55d6eff
commit
f766059ea8
1 changed files with 1 additions and 0 deletions
|
|
@ -703,6 +703,7 @@ nm_ndisc_add_route(NMNDisc *ndisc, const NMNDiscRoute *new_item, gint64 now_msec
|
|||
* comparison is aborted, and both routes are added.
|
||||
*/
|
||||
if (IN6_ARE_ADDR_EQUAL(&item->network, &new_item->network) && item->plen == new_item->plen
|
||||
&& IN6_ARE_ADDR_EQUAL(&item->gateway, &new_item->gateway)
|
||||
&& item->on_link == new_item->on_link) {
|
||||
if (new_item->expiry_msec <= now_msec) {
|
||||
g_array_remove_index(rdata->routes, i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue