bgpd: Rollback "always send OPEN" a little, to workaround test suite issues
* "bgpd: Send OPEN immediately on inbound connections" doesn't play well with
some partial BGP implementations, test and conformance suites e.g., which
have rigid expectations about ordering and don't implement much of CD.
roll back, but only a little, by deferring OPEN sending on outbound till
receive.
* bgpd.h: (struct peer) add PEER_STATUS_OPEN_DEFERRED status flag.
Kind of a sub-fsm. Main FSM does not allow transition functions to
signal next-state - next-state is inflexibly fixed in the table -
so can't handle it cleanly at that level.
* bgp_fsm.c: (bgp_connect_success) Defer sending open if the peer is
an accept-peer/inbound and there appears to be an outbound connection
in progress. Set PEER_STATUS_OPEN_DEFERRED to signal to bgp_open_receive
that an OPEN still must be sent.
* bgp_packet.c: (bgp_open_receive) Send the OPEN here, when deferred.
3 files changed