From d2921c7a53395832446340b566e6ae9be785dca3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 7 May 2016 15:43:50 -0400 Subject: [PATCH] bgpd: Fix possible api.tag uninitialized usage Signed-off-by: Donald Sharp Reviewed-by: Don Slice Reviewed-by: Daniel Walton --- bgpd/bgp_zebra.c | 4 ++++ 1 file changed, 4 insertions(+) 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)) { -- 2.39.5