]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: initialise nexthop structure, before filling in some attributes
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 3 May 2018 12:11:03 +0000 (14:11 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 31 May 2018 15:44:40 +0000 (17:44 +0200)
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>
bgpd/bgp_pbr.c

index 3e3f15b989483491d1b6c22d6f067ae62ad07ce8..120d0b390f22c44070c4b8b266f663d82a2822c7 100644 (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)