From: Donatas Abraitis Date: Wed, 2 Sep 2020 05:44:27 +0000 (+0300) Subject: bgpd: Create separate udpate-group when using `maximum-prefix-out` command X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d6fbec85fefaf32df4fa23bd3e4043b3f4180552;p=matthieu%2Ffrr.git bgpd: Create separate udpate-group when using `maximum-prefix-out` command This is needed to avoid mangling update-group which is used for many peers. Sent prefix count is managed by update-groups. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index a29721988e..017a4429ae 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -373,11 +373,13 @@ static unsigned int updgrp_hash_key_make(const void *p) * There are certain peers that must get their own update-group: * - lonesoul peers * - peers that negotiated ORF + * - maximum-prefix-out is set */ if (CHECK_FLAG(peer->flags, PEER_FLAG_LONESOUL) || CHECK_FLAG(peer->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_RCV) || CHECK_FLAG(peer->af_cap[afi][safi], - PEER_CAP_ORF_PREFIX_SM_OLD_RCV)) + PEER_CAP_ORF_PREFIX_SM_OLD_RCV) + || CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT)) key = jhash_1word(jhash(peer->host, strlen(peer->host), SEED2), key);