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_advertise.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_advertise.h')
| -rw-r--r-- | bgpd/bgp_advertise.h | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_advertise.h b/bgpd/bgp_advertise.h index f2cf78efde..745a0dffce 100644 --- a/bgpd/bgp_advertise.h +++ b/bgpd/bgp_advertise.h @@ -83,6 +83,9 @@ struct bgp_adj_out {  	/* Advertisement information.  */  	struct bgp_advertise *adv; + +	/* Attribute hash */ +	uint32_t attr_hash;  };  RB_HEAD(bgp_adj_out_rb, bgp_adj_out);  | 
