bgpd: collision-detect should retain Established peers + tidy logic + logs

* bgp_network.c: (bgp_accept) We should also reject connections where
  the main peer is in >Established state.
  Could potentially also reject connections for main peer == Established
  here too.

  Log the port number too, so it's easier to reconcile logs with
  network dumps.

* bgp_packet.c: (bgp_collision_detect) Try factor out some of the
  conditionals controlling the action of the loop to the top, for
  readability.

  Handle existing Established session, by closing the new one, favouring
  stability and as per RFC, except for GR.

  (bgp_open_receive) Tidy up the logic a bit for readability, making each
  case distinct in the main body of the loop.
2 files changed