bgpd: collision detection assumes 'new' peer is the inbound connection

* bgp_packet.c: (bgp_collision_detect) for a long time, this has assumed
  the 'new' peer argument on which an OPEN has just been received must be
  an 'inbound' connection, and the looked up 'peer' the outbound. However,
  this doesn't seem a robust assumption. It seems possible it could be the
  other way around.

  The consequences are that collision detection could behave inconsistently
  with other implementations, and result in both sides closing the same
  connection.

  Fix to follow the RFC.
1 file changed