hi,
find attached an initial rough patch of my attempt to fix up
collision detection in Zebra/Quagga bgpd.
it:
- adds fd_local and fd_accept to struct peer
- changes fd to a pointer in struct peer
- removes the creation of a 'dummy' peer for remote initiated
connections
- changes bgp_collision_detect to:
- only check state OpenConfirm peers
- compare the BGP of the existing peer to the ID given (which
came from the open)
- close the offending socket - not send a NOTIFY (is it valid
to send a NOTIFY? peer must surely be in state OpenSent or
OpenConfirm?)
- update the peer fd pointer if needed and set the read
thread
- removes the code that has to copy dummy to real peer in event of a
collision in bgp_open_receive
- removes the code in bgp_accept to create a dummy peer.
its a rough initial patch, does appear to work with some brief
testing between 2 bgpd's (one with patch, one without), in principle
is simpler, but needs review and heavy testing.
also, at present the bgpd FSM simply logs and ignores many events
which should really result in sessions being shutdown and returned to
idle.
regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
I haven't lost my mind -- it's backed up on tape somewhere.
find attached an initial rough patch of my attempt to fix up
collision detection in Zebra/Quagga bgpd.
it:
- adds fd_local and fd_accept to struct peer
- changes fd to a pointer in struct peer
- removes the creation of a 'dummy' peer for remote initiated
connections
- changes bgp_collision_detect to:
- only check state OpenConfirm peers
- compare the BGP of the existing peer to the ID given (which
came from the open)
- close the offending socket - not send a NOTIFY (is it valid
to send a NOTIFY? peer must surely be in state OpenSent or
OpenConfirm?)
- update the peer fd pointer if needed and set the read
thread
- removes the code that has to copy dummy to real peer in event of a
collision in bgp_open_receive
- removes the code in bgp_accept to create a dummy peer.
its a rough initial patch, does appear to work with some brief
testing between 2 bgpd's (one with patch, one without), in principle
is simpler, but needs review and heavy testing.
also, at present the bgpd FSM simply logs and ignores many events
which should really result in sessions being shutdown and returned to
idle.
regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
I haven't lost my mind -- it's backed up on tape somewhere.