From 8cda910629ed994a8ba0f6094427162ef8ffa98a Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Thu, 3 May 2018 14:11:03 +0200 Subject: [PATCH] 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 --- bgpd/bgp_pbr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 3e3f15b989..120d0b390f 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -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) -- 2.39.5