summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-11-14 01:35:20 +0100
committerDonald Sharp <sharpd@nvidia.com>2020-11-14 01:35:20 +0100
commit1782514fb957d86c0e2510f2e76651345c5c9fb1 (patch)
treed4282946603ca67c78ee17ff03aa7cf890e577bd /bgpd/rfapi
parentMerge pull request #7474 from eololab/fix-crash-skiplist-debug (diff)
downloadfrr-1782514fb957d86c0e2510f2e76651345c5c9fb1.tar.xz
frr-1782514fb957d86c0e2510f2e76651345c5c9fb1.zip
*: Remove route_map_object_t from the system
The route_map_object_t was being used to track what protocol we were being called against. But each protocol was only ever calling itself. So we had a variable that was only ever being passed in from route_map_apply that had to be carried against and everyone was testing if that variable was for their own stack. Clean up this route_map_object_t from the entire system. We should speed some stuff up. Yes I know not a bunch but this will add up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/rfapi')
-rw-r--r--bgpd/rfapi/vnc_export_bgp.c13
-rw-r--r--bgpd/rfapi/vnc_import_bgp.c6
2 files changed, 8 insertions, 11 deletions
diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c
index 11f39b2b8..762cd2596 100644
--- a/bgpd/rfapi/vnc_export_bgp.c
+++ b/bgpd/rfapi/vnc_export_bgp.c
@@ -290,7 +290,7 @@ void vnc_direct_bgp_add_route_ce(struct bgp *bgp, struct agg_node *rn,
info.peer = peer;
info.attr = &hattr;
ret = route_map_apply(bgp->rfapi_cfg->routemap_export_bgp,
- prefix, RMAP_BGP, &info);
+ prefix, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
return;
@@ -1033,7 +1033,7 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
ret = route_map_apply(
rfgn->rfg
->routemap_export_bgp,
- p, RMAP_BGP, &info);
+ p, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
continue;
@@ -1242,8 +1242,7 @@ static void vnc_direct_add_rn_group_rd(struct bgp *bgp,
info.peer = irfd->peer;
info.attr = &hattr;
- ret = route_map_apply(rfg->routemap_export_bgp, p, RMAP_BGP,
- &info);
+ ret = route_map_apply(rfg->routemap_export_bgp, p, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
vnc_zlog_debug_verbose(
@@ -1691,8 +1690,7 @@ void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi,
memset(&info, 0, sizeof(info));
info.peer = peer;
info.attr = &hattr;
- ret = route_map_apply(hc->routemap_export_bgp, prefix, RMAP_BGP,
- &info);
+ ret = route_map_apply(hc->routemap_export_bgp, prefix, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
return;
@@ -1917,8 +1915,7 @@ void vnc_direct_bgp_rh_vpn_enable(struct bgp *bgp, afi_t afi)
info.attr = &hattr;
ret = route_map_apply(
hc->routemap_export_bgp,
- dest_p, RMAP_BGP,
- &info);
+ dest_p, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
vnc_zlog_debug_verbose(
diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c
index 0b6b39b96..097e7942c 100644
--- a/bgpd/rfapi/vnc_import_bgp.c
+++ b/bgpd/rfapi/vnc_import_bgp.c
@@ -357,7 +357,7 @@ static int process_unicast_route(struct bgp *bgp, /* in */
memset(&info, 0, sizeof(info));
info.peer = peer;
info.attr = &hattr;
- ret = route_map_apply(rmap, prefix, RMAP_BGP, &info);
+ ret = route_map_apply(rmap, prefix, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
vnc_zlog_debug_verbose(
@@ -784,7 +784,7 @@ static void vnc_import_bgp_add_route_mode_plain(struct bgp *bgp,
memset(&info, 0, sizeof(info));
info.peer = peer;
info.attr = &hattr;
- ret = route_map_apply(rmap, prefix, RMAP_BGP, &info);
+ ret = route_map_apply(rmap, prefix, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
vnc_zlog_debug_verbose(
@@ -977,7 +977,7 @@ static void vnc_import_bgp_add_route_mode_nvegroup(
memset(&path, 0, sizeof(path));
path.peer = peer;
path.attr = &hattr;
- ret = route_map_apply(rmap, prefix, RMAP_BGP, &path);
+ ret = route_map_apply(rmap, prefix, &path);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
vnc_zlog_debug_verbose(