mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 02:30:52 +00:00
2006-01-18 Gunnar Stigen <gunnar.stigen@axxessit.no>
* zebra_rib.c: Take interface metric into account.
This commit is contained in:
parent
eac314c7c4
commit
af887b5111
@ -1,3 +1,7 @@
|
|||||||
|
2006-01-18 Gunnar Stigen <gunnar.stigen@axxessit.no>
|
||||||
|
|
||||||
|
* zebra_rib.c: Take interface metric into account.
|
||||||
|
|
||||||
2006-01-17 Paul Jakma <paul.jakma@sun.com>
|
2006-01-17 Paul Jakma <paul.jakma@sun.com>
|
||||||
|
|
||||||
* kernel_socket.c: (ifam_read) Read metric from RTM_NEWADDR.
|
* kernel_socket.c: (ifam_read) Read metric from RTM_NEWADDR.
|
||||||
|
@ -919,10 +919,23 @@ rib_process (struct work_queue *wq, void *data)
|
|||||||
if (rib->distance == DISTANCE_INFINITY)
|
if (rib->distance == DISTANCE_INFINITY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Newly selected rib. */
|
/* Newly selected rib, the common case. */
|
||||||
if (! select || rib->distance < select->distance
|
if (!select)
|
||||||
|| rib->type == ZEBRA_ROUTE_CONNECT)
|
{
|
||||||
select = rib;
|
select = rib;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* filter route selection in following order:
|
||||||
|
* - lower distance beats higher
|
||||||
|
* - connected beats other types
|
||||||
|
* - lower metric beats higher for equal distance
|
||||||
|
* - last, hence oldest, route wins tie break.
|
||||||
|
*/
|
||||||
|
if ((rib->type == ZEBRA_ROUTE_CONNECT)
|
||||||
|
|| (rib->distance <= select->distance))
|
||||||
|
if (rib->metric <= select->metric)
|
||||||
|
select = rib;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Deleted route check. */
|
/* Deleted route check. */
|
||||||
|
Loading…
Reference in New Issue
Block a user