forked from Mirror/frr
bgpd: rework bmp end of rib processing
Move the end of rib processing code of a given BGP instance in a separate function. This code prepares the next commit, it avoids having the following warning: > WARNING: Too many leading tabs - consider code refactoring Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
3e05ba06e6
commit
d34fe66a5d
|
@ -1240,6 +1240,19 @@ static void bmp_monitor(struct bmp *bmp, struct peer *peer, uint8_t flags,
|
|||
stream_free(msg);
|
||||
}
|
||||
|
||||
static void bmp_eor_afi_safi(struct bmp *bmp, afi_t afi, safi_t safi, uint8_t peer_type_flag)
|
||||
{
|
||||
zlog_info("bmp[%s] %s %s table completed (EoR)", bmp->remote, afi2str(afi), safi2str(safi));
|
||||
|
||||
bmp_eor(bmp, afi, safi, BMP_PEER_FLAG_L, peer_type_flag);
|
||||
bmp_eor(bmp, afi, safi, 0, peer_type_flag);
|
||||
bmp_eor(bmp, afi, safi, 0, BMP_PEER_TYPE_LOC_RIB_INSTANCE);
|
||||
|
||||
bmp->afistate[afi][safi] = BMP_AFI_LIVE;
|
||||
bmp->syncafi = AFI_MAX;
|
||||
bmp->syncsafi = SAFI_MAX;
|
||||
}
|
||||
|
||||
static bool bmp_wrsync(struct bmp *bmp, struct pullwr *pullwr)
|
||||
{
|
||||
uint8_t bpi_num_labels, adjin_num_labels;
|
||||
|
@ -1340,19 +1353,9 @@ afibreak:
|
|||
return true;
|
||||
}
|
||||
eor:
|
||||
zlog_info("bmp[%s] %s %s table completed (EoR)",
|
||||
bmp->remote, afi2str(afi),
|
||||
safi2str(safi));
|
||||
|
||||
bmp_eor(bmp, afi, safi, BMP_PEER_FLAG_L, peer_type_flag);
|
||||
bmp_eor(bmp, afi, safi, 0, peer_type_flag);
|
||||
bmp_eor(bmp, afi, safi, 0,
|
||||
BMP_PEER_TYPE_LOC_RIB_INSTANCE);
|
||||
|
||||
bmp->afistate[afi][safi] = BMP_AFI_LIVE;
|
||||
bmp->syncafi = AFI_MAX;
|
||||
bmp->syncsafi = SAFI_MAX;
|
||||
return true;
|
||||
bmp_eor_afi_safi(bmp, afi, safi,
|
||||
peer_type_flag);
|
||||
return true;
|
||||
}
|
||||
bmp->syncpeerid = 0;
|
||||
prefix_copy(&bmp->syncpos, bgp_dest_get_prefix(bn));
|
||||
|
|
Loading…
Reference in a new issue