diff options
author | paul <paul> | 2006-01-30 14:08:51 +0000 |
---|---|---|
committer | paul <paul> | 2006-01-30 14:08:51 +0000 |
commit | 94cbbe89ccbd6a9049b5227da55715a5ce3f0a94 (patch) | |
tree | a383ee66c5cc157c63f38e451e8ca44e9ef0ac6b /zebra/zebra_rib.c | |
parent | b08013ef7ace9804d8c4dfacbdb3fecf09a2da2a (diff) | |
download | quagga-94cbbe89ccbd6a9049b5227da55715a5ce3f0a94.tar.bz2 quagga-94cbbe89ccbd6a9049b5227da55715a5ce3f0a94.tar.xz |
[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/zebra_rib.c')
-rw-r--r-- | zebra/zebra_rib.c | 12 |
1 files changed, 7 insertions, 5 deletions
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; |