From: Donald Sharp Date: Sat, 7 May 2016 19:43:50 +0000 (-0400) Subject: bgpd: Fix possible api.tag uninitialized usage X-Git-Tag: frr-2.0-rc1~897 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d2921c7a53395832446340b566e6ae9be785dca3;p=matthieu%2Ffrr.git bgpd: Fix possible api.tag uninitialized usage Signed-off-by: Donald Sharp Reviewed-by: Don Slice Reviewed-by: Daniel Walton --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 457f865bea..0241be380f 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -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)) {