Skip to content

Commit 29df5e1

Browse files
bgpd: initialise nh_flag attribute
in "leak_update" function nh_flag is not initialized when nexthop is valid at route creation. Signed-off-by: Francois Dumontet <[email protected]>
1 parent 3b43f15 commit 29df5e1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bgpd/bgp_mplsvpn.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,10 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,
14401440
new->extra->vrfleak->nexthop_orig = *nexthop_orig;
14411441

14421442
if (leak_update_nexthop_valid(to_bgp, bn, new_attr, afi, safi,
1443-
source_bpi, new, bgp_orig, p, debug))
1443+
source_bpi, new, bgp_orig, p, debug)) {
14441444
bgp_path_info_set_flag(bn, new, BGP_PATH_VALID);
1445+
SET_FLAG(new->attr->nh_flag, BGP_ATTR_NH_VALID);
1446+
}
14451447
else
14461448
bgp_path_info_unset_flag(bn, new, BGP_PATH_VALID);
14471449

0 commit comments

Comments
 (0)