diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-09 12:30:05 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-03-09 12:30:05 +0100 |
commit | 1b9189d5fdab672f91600b7e72a1deeab277eafc (patch) | |
tree | a6f5c92209a9c290fd0bb7c583fb1d606b133e66 /proto | |
parent | 69d1ffde4c724882398b3b630ea1199f12c0c288 (diff) |
Route validity check converted to generic macro dispatch
Diffstat (limited to 'proto')
-rw-r--r-- | proto/bgp/attrs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 90490b4f..1d9b3630 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -2212,7 +2212,7 @@ bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best) /* The default case - find a new best-in-group route */ rte *r = new; /* new may not be in the list */ - for (struct rte_storage *s = net->routes; rte_is_valid(&s->rte); s = s->next) + for (struct rte_storage *s = net->routes; rte_is_valid(s); s = s->next) if (use_deterministic_med(s) && same_group(&s->rte, lpref, lasn)) { s->rte.pflags |= BGP_REF_SUPPRESSED; @@ -2229,7 +2229,7 @@ bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best) new->pflags &= ~BGP_REF_SUPPRESSED; /* Found all existing routes mergable with best-in-group */ - for (struct rte_storage *s = net->routes; rte_is_valid(&s->rte); s = s->next) + for (struct rte_storage *s = net->routes; rte_is_valid(s); s = s->next) if (use_deterministic_med(s) && same_group(&s->rte, lpref, lasn)) if ((&s->rte != r) && bgp_rte_mergable(r, &s->rte)) s->rte.pflags &= ~BGP_REF_SUPPRESSED; |