From 96f10e1edc439b1aeae39c2cd722bdb995ad7647 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 26 Sep 2018 07:51:49 -0400 Subject: [PATCH] bgpd: Fix missed usage of bgp_static_get_node_info() Fix the missed usage of bgp_static_get_node_info and also cleanup the function around it that was using it to make it a bit more readable. Signed-off-by: Donald Sharp --- bgpd/bgp_routemap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index f7c4175383..8093ffe49f 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3226,11 +3226,13 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name, /* For network route-map updates. */ for (bn = bgp_table_top(bgp->route[afi][safi]); bn; - bn = bgp_route_next(bn)) - if ((bgp_static = bn->info) != NULL) { + bn = bgp_route_next(bn)) { + bgp_static = bgp_static_get_node_info(bn); + if (bgp_static != NULL) { if (bgp_static->rmap.name && (strcmp(rmap_name, bgp_static->rmap.name) == 0)) { + bgp_static->rmap.map = map; if (route_update) @@ -3253,6 +3255,7 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name, } } } + } } /* For redistribute route-map updates. */ -- 2.39.5