diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-04-08 16:39:22 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-04-08 16:56:56 +0200 |
commit | 4a50c8bd0310053a3dcab45c8dde0362348c0503 (patch) | |
tree | 46f0b922b4a28c63f36cad87f7f6499bbaf52cb3 /proto/bgp/bgp.h | |
parent | 23ee6b1cd6dc597876d91db9a015f7a633764808 (diff) |
BGP: Handle corner cases in event ordering
When BGP connection is opened, it may happen that rx hook (with remote
OPEN) is called before tx hook (for local OPEN). Therefore, we need to do
internal changes (like setting local_caps) synchronously with OPENSENT
transition and we need to ensure that OPEN is sent before KEEPALIVE.
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r-- | proto/bgp/bgp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index fd515cbb..4d24e4fa 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -218,6 +218,8 @@ struct bgp_caps { u16 gr_time; /* Graceful restart time in seconds */ u8 llgr_aware; /* Long-lived GR capability, RFC draft */ + u8 any_ext_next_hop; /* Bitwise OR of per-AF ext_next_hop */ + u8 any_add_path; /* Bitwise OR of per-AF add_path */ u16 af_count; /* Number of af_data items */ u16 length; /* Length of capabilities in OPEN msg */ @@ -556,6 +558,7 @@ void bgp_get_route_info(struct rte *, byte *buf); /* packets.c */ void bgp_dump_state_change(struct bgp_conn *conn, uint old, uint new); +void bgp_prepare_capabilities(struct bgp_conn *conn); const struct bgp_af_desc *bgp_get_af_desc(u32 afi); const struct bgp_af_caps *bgp_find_af_caps(struct bgp_caps *caps, u32 afi); void bgp_schedule_packet(struct bgp_conn *conn, struct bgp_channel *c, int type); |