[zebra] Fix pauls zebra_rib/rib_process commit mistakes, again.

2006-01-30 Paul Jakma <paul.jakma@sun.com>

	* zebra_rib.c: (rib_process) Fourth time lucky on this jinxed
	  commit, last commit had a hole that could allow connected
	  route selection to escape beyond the connected route logic.
	  This time I cross-checked with Gunnar first. ;)
This commit is contained in:
paul 2006-01-30 14:08:51 +00:00
parent a8d9c1f9ca
commit a1038a1565
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2006-01-30 Paul Jakma <paul.jakma@sun.com>
* zebra_rib.c: (rib_process) Fourth time lucky on this jinxed
commit, last commit had a hole that could allow connected
route selection to escape beyond the connected route logic.
This time I cross-checked with Gunnar first. ;)
2006-01-25 Gunnar Stigen <gunnar.stigen@axxessit.no>
* zebra_rib.c: (rib_process) Application of Gunnar's earlier

View File

@ -932,14 +932,16 @@ rib_process (struct work_queue *wq, void *data)
* - lower metric beats higher for equal distance
* - last, hence oldest, route wins tie break.
*/
/* Connected routes. Pick the last connected
* route of the set of lowest metric connected routes.
*/
if (rib->type == ZEBRA_ROUTE_CONNECT)
{
if (select->type != ZEBRA_ROUTE_CONNECT
if (select->type != ZEBRA_ROUTE_CONNECT
|| rib->metric <= select->metric)
{
select = rib;
continue;
}
select = rib;
continue;
}
else if (select->type == ZEBRA_ROUTE_CONNECT)
continue;