bgpd: initialise nexthop structure, before filling in some attributes

In order to have a clean structure, a reset is done before using the
struct nexthop.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2018-05-03 14:11:03 +02:00
parent e414819ed4
commit 8cda910629

View File

@ -1220,6 +1220,7 @@ static void bgp_pbr_handle_entry(struct bgp *bgp,
struct bgp_pbr_range_port *srcp = NULL, *dstp = NULL;
struct bgp_pbr_range_port range;
memset(&nh, 0, sizeof(struct nexthop));
if (api->match_bitmask & PREFIX_SRC_PRESENT)
src = &api->src_prefix;
if (api->match_bitmask & PREFIX_DST_PRESENT)