diff options
| author | David Lamparter <equinox@diac24.net> | 2019-06-11 10:59:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-11 10:59:25 +0200 |
| commit | 35aa470801c283502c9a54c71aa553cacbbb10fc (patch) | |
| tree | b43e4102bf3fa737fade5f537b1e0db3c4066400 /zebra/zebra_rnh.c | |
| parent | 82e16a13e5f8da8460486f7eeff57c6235be71e0 (diff) | |
| parent | b822b93a356c200202b7e7f90cbadd7068837c2b (diff) | |
Merge pull request #4493 from sworleys/Pbr-NHT-Fix
zebra, pbrd: PBR handle nexthop tracking correctly
Diffstat (limited to 'zebra/zebra_rnh.c')
| -rw-r--r-- | zebra/zebra_rnh.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index a63d015716..1024f3a052 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -592,54 +592,6 @@ static void zebra_rnh_notify_protocol_clients(struct zebra_vrf *zvrf, afi_t afi, zebra_rnh_clear_nexthop_rnh_filters(re); } -static void zebra_rnh_process_pbr_tables(afi_t afi, struct route_node *nrn, - struct rnh *rnh, - struct route_node *prn, - struct route_entry *re) -{ - struct zebra_router_table *zrt; - struct route_entry *o_re; - struct route_node *o_rn; - struct listnode *node; - struct zserv *client; - - /* - * We are only concerned about nexthops that change for - * anyone using PBR - */ - for (ALL_LIST_ELEMENTS_RO(rnh->client_list, node, client)) { - if (client->proto == ZEBRA_ROUTE_PBR) - break; - } - - if (!client) - return; - - RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) { - if (afi != zrt->afi) - continue; - - for (o_rn = route_top(zrt->table); o_rn; - o_rn = srcdest_route_next(o_rn)) { - RNODE_FOREACH_RE (o_rn, o_re) { - if (o_re->type == ZEBRA_ROUTE_PBR) - break; - - } - - /* - * If we have a PBR route and a nexthop changes - * just rethink it. Yes this is a hammer, but - * a small one - */ - if (o_re) { - SET_FLAG(o_re->status, ROUTE_ENTRY_CHANGED); - rib_queue_add(o_rn); - } - } - } -} - /* * Utility to determine whether a candidate nexthop is useable. We make this * check in a couple of places, so this is a single home for the logic we @@ -834,8 +786,6 @@ static void zebra_rnh_eval_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi, zebra_rnh_notify_protocol_clients(zvrf, afi, nrn, rnh, prn, rnh->state); - zebra_rnh_process_pbr_tables(afi, nrn, rnh, prn, rnh->state); - /* Process pseudowires attached to this nexthop */ zebra_rnh_process_pseudowires(zvrf->vrf->vrf_id, rnh); } |
