]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fix missed usage of bgp_static_get_node_info()
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 26 Sep 2018 11:51:49 +0000 (07:51 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Nov 2018 14:43:35 +0000 (09:43 -0500)
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 <sharpd@cumulusnetworks.com>
bgpd/bgp_routemap.c

index f7c4175383338ab85dfb93794085fc91162ece70..8093ffe49f6b8397cbe17bc80511290ff76d3119 100644 (file)
@@ -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. */