]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fix possible api.tag uninitialized usage
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Sat, 7 May 2016 19:43:50 +0000 (15:43 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 19 May 2016 14:42:34 +0000 (10:42 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
bgpd/bgp_zebra.c

index 457f865beababbc765c56e386601a8e5129c23a5..0241be380fdc2cd2e91263114f01a3733ed21970 100644 (file)
@@ -1363,6 +1363,7 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp,
       api.ifindex_num = 0;
       SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
       api.metric = metric;
+      api.tag = 0;
 
       if (tag)
         {
@@ -1549,6 +1550,7 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp,
       api.ifindex = (unsigned int *)STREAM_DATA (bgp_ifindices_buf);
       SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
       api.metric = metric;
+      api.tag = 0;
 
       if (tag)
         {
@@ -1676,6 +1678,7 @@ bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi)
       api.ifindex_num = 0;
       SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
       api.metric = info->attr->med;
+      api.tag = 0;
 
       if ((info->attr->extra) && (info->attr->extra->tag != 0))
         {
@@ -1715,6 +1718,7 @@ bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi)
       api.ifindex_num = 0;
       SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
       api.metric = info->attr->med;
+      api.tag = 0;
 
       if ((info->attr->extra) && (info->attr->extra->tag != 0))
         {