]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fix SA issue with uninited ifindex value
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 May 2018 13:37:34 +0000 (09:37 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 May 2018 13:37:34 +0000 (09:37 -0400)
The rearrangement of where the decision point of
filling in the aggregate information, must have allowed
SA to find a path of code where we may use ifindex uninitialized.
While I don't think this is possible to happen, make this issue
go away.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_zebra.c

index e4f4823e6f180c32865d33e6446599aace9e962c..1cd51cb6f4aa96f793ed14cb07986767ce34ef13 100644 (file)
@@ -1316,7 +1316,7 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
                                        &mpinfo_cp->attr->nexthop,
                                        mpinfo_cp->attr, is_evpn, api_nh);
                } else {
-                       ifindex_t ifindex;
+                       ifindex_t ifindex = IFINDEX_INTERNAL;
                        struct in6_addr *nexthop;
 
                        if (bgp->table_map[afi][safi].name) {