diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-25 20:28:26 +0200 | 
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-25 20:51:16 +0200 | 
| commit | 4338e21aa2feba57ea7004c36362e5d8186340b8 (patch) | |
| tree | a59848c24d3a5469470a7789d3ae7a4e9a0b0230 /bgpd/bgp_addpath.h | |
| parent | f471573651cb4018af6aafc7440fa7977fc9578c (diff) | |
Revert "bgpd: Handle Addpath capability using dynamic capabilities"
This reverts commit 05cf9d03b345393b8d63ffe9345c42debd8362b6.
TL;DR; Handling BGP AddPath capability is not trivial (possible) dynamically.
When the sender is AddPath-capable and sends NLRIs encoded with AddPath ID,
and at the same time the receiver sends AddPath capability "disable-addpath-rx"
(flag update) via dynamic capabilities, both peers are out of sync about the
AddPath state. The receiver thinks already he's not AddPath-capable anymore,
hence it tries to parse NLRIs as non-AddPath, while they are actually encoded
as AddPath.
AddPath capability itself does not provide (in RFC) any mechanism on backward
compatible way to handle NLRIs if they come mixed (AddPath + non-AddPath).
This explains why we have failures in our CI periodically.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_addpath.h')
| -rw-r--r-- | bgpd/bgp_addpath.h | 9 | 
1 files changed, 1 insertions, 8 deletions
diff --git a/bgpd/bgp_addpath.h b/bgpd/bgp_addpath.h index f1ff98ea7a..c136671ea4 100644 --- a/bgpd/bgp_addpath.h +++ b/bgpd/bgp_addpath.h @@ -15,11 +15,7 @@  #include "bgpd/bgp_table.h"  #include "lib/json.h" -struct bgp_addpath_capability { -	uint16_t afi; -	uint8_t safi; -	uint8_t flags; -}; +#define BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE 1  struct bgp_paths_limit_capability {  	uint16_t afi; @@ -27,8 +23,6 @@ struct bgp_paths_limit_capability {  	uint16_t paths_limit;  } __attribute__((packed)); -#define BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE 1 -  void bgp_addpath_init_bgp_data(struct bgp_addpath_bgp_data *d);  bool bgp_addpath_is_addpath_used(struct bgp_addpath_bgp_data *d, afi_t afi, @@ -68,5 +62,4 @@ void bgp_addpath_update_ids(struct bgp *bgp, struct bgp_dest *dest, afi_t afi,  			    safi_t safi);  void bgp_addpath_type_changed(struct bgp *bgp); -extern int bgp_addpath_capability_action(enum bgp_addpath_strat addpath_type, uint16_t paths);  #endif  | 
