From: Donald Sharp Date: Wed, 26 Sep 2018 11:51:49 +0000 (-0400) Subject: bgpd: Fix missed usage of bgp_static_get_node_info() X-Git-Tag: frr-7.1-dev~108^2~8 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=96f10e1edc439b1aeae39c2cd722bdb995ad7647;p=matthieu%2Ffrr.git 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 --- 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. */