Skip to content

Commit f20d519

Browse files
committed
server/fsm: support parallel connections
Support two parallel connections; outgoing or incoming; until established state. When trying to establish a BGP session, the current implementation keeps only one TCP conneciton; outgoing or incoming. This makes the session establishment fragle. RFC 4271 says: 6.8. BGP Connection Collision Detection If a pair of BGP speakers try to establish a BGP connection with each other simultaneously, then two parallel connections well be formed. Although RFC 4271 can be interpreted as allowing multiple incoming connections, to keep the implementation simple, we only manage two simultaneous connections; one incoming and one outgoing. Each connection (incoming and outgoing) maintains its own FSM state, resulting in two concurrent states during connection establishment. When an API queries the FSM state, the implementation returns the passive (incoming) connection's state until one of the connections reaches OPENCONFIRM. This behavior is implementation-dependent. For example, BIRD returns whichever connection has progressed further in the FSM state machine. Signed-off-by: FUJITA Tomonori <[email protected]>
1 parent 161c952 commit f20d519

File tree

1 file changed

+322
-75
lines changed

1 file changed

+322
-75
lines changed

0 commit comments

Comments
 (0)