diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-11-12 12:30:19 +0200 | 
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-12-11 14:51:05 +0200 | 
| commit | 2adac2562a02fb20cb5fc783c2e6019a1a76354f (patch) | |
| tree | bba5c614ff7931bc77ed7d44a00e7ab617e32dba /bgpd/bgp_updgrp.h | |
| parent | b64e1733746a2cabb5b25b283407c095fc1c8c3a (diff) | |
bgpd: Do not send BGP UPDATE if the route actually not changed
Reference: https://www.cmand.org/communityexploration
                     --y2--
                    /  |   \
  c1 ---- x1 ---- y1   |   z1
                    \  |   /
                     --y3--
1. z1 announces 192.168.255.254/32 to y2, y3.
2. y2 and y3 tags this prefix at ingress with appropriate
communities 65004:2 (y2) and 65004:3 (y3).
3. x1 filters all communities at the egress to c1.
4. Shutdown the link between y1 and y2.
5. y1 will generate a BGP UPDATE message regarding the next-hop change.
6. x1 will generate a BGP UPDATE message regarding community change.
To avoid sending duplicate BGP UPDATE messages we should make sure
we send only actual route updates. In this example, x1 will skip
BGP UPDATE to c1 because the actual route is the same
(filtered communities - nothing changes).
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_updgrp.h')
| -rw-r--r-- | bgpd/bgp_updgrp.h | 12 | 
1 files changed, 3 insertions, 9 deletions
diff --git a/bgpd/bgp_updgrp.h b/bgpd/bgp_updgrp.h index 9cad78c26d..7261933dc9 100644 --- a/bgpd/bgp_updgrp.h +++ b/bgpd/bgp_updgrp.h @@ -252,20 +252,14 @@ struct update_subgroup {  	uint64_t id;  	uint16_t sflags; +#define SUBGRP_STATUS_DEFAULT_ORIGINATE (1 << 0) +#define SUBGRP_STATUS_FORCE_UPDATES (1 << 1) -	/* Subgroup flags, see below  */  	uint16_t flags; +#define SUBGRP_FLAG_NEEDS_REFRESH (1 << 0)  };  /* - * We need to do an outbound refresh to get this subgroup into a - * consistent state. - */ -#define SUBGRP_FLAG_NEEDS_REFRESH         (1 << 0) - -#define SUBGRP_STATUS_DEFAULT_ORIGINATE   (1 << 0) - -/*   * Add the given value to the specified counter on a subgroup and its   * parent structures.   */  | 
