summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorpaul <paul>2006-01-30 14:08:51 +0000
committerpaul <paul>2006-01-30 14:08:51 +0000
commita1038a15658d2fd4ab3314a9036bbd63f8f471c1 (patch)
tree5cef40b1e66fd105d0d0d6e4ecf52089ed15e803 /zebra
parenta8d9c1f9caae29410b74f138f81d9b07645c47ce (diff)
[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. ;)
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog7
-rw-r--r--zebra/zebra_rib.c12
2 files changed, 14 insertions, 5 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 9f892c83..e7079757 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -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
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index f377400f..330bce77 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -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;