During connection establishment, there is a separate peer structure created
for the doppelganger (for incoming connection). When this is deleted after
the connection has established, take care to ensure that the nexthop entry
for the peer is not deleted.
Fixes: f9164b1d74f6a20d69d7ef10d2e39b4ae7996cbf
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-13875
Reviewed By: None
Testing Done: Manual
(cherry picked from commit
4f2bc892cbddbf36bd5e1b2f36c33260af614b33)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgp_fsm_change_status (peer, Deleted);
/* Remove from NHT */
- bgp_unlink_nexthop_by_peer (peer);
+ if (CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
+ bgp_unlink_nexthop_by_peer (peer);
/* Password configuration */
if (peer->password)