From 0ab7b206a6eb5f059de5a7ce9cfe966a5ccd8ad5 Mon Sep 17 00:00:00 2001 From: Ameya Dharkar Date: Tue, 9 Oct 2018 11:56:46 -0700 Subject: [PATCH] bgpd: Incorrect sent prefix count for a split subgroup When a subgroup splits to form a new subgroup because of policy changes for a peer, new subgroup copies adj out(state about advertised routes) from the parent subgroup. At the same time, it should also copy scount(advertised prefix count) to the new subgroup for the count to be in sync with the adj_out for the subgroup. Signed-off-by: Ameya Dharkar --- bgpd/bgp_updgrp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 7f7b4a893f..2a4c3690c9 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -1182,6 +1182,8 @@ static void update_subgroup_copy_adj_out(struct update_subgroup *source, aout_copy->attr = aout->attr ? bgp_attr_intern(aout->attr) : NULL; } + + dest->scount = source->scount; } /* -- 2.39.5