From: Philippe Guibert Date: Thu, 3 May 2018 12:11:03 +0000 (+0200) Subject: bgpd: initialise nexthop structure, before filling in some attributes X-Git-Tag: frr-6.1-dev~395^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8cda910629ed994a8ba0f6094427162ef8ffa98a;p=matthieu%2Ffrr.git 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 --- 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)