Comment 12 for bug 1664343

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28957
Committed: http://github.org/Juniper/contrail-controller/commit/3aa73d49ed477c997cf3438349a3262af52e1ba6
Submitter: Zuul (<email address hidden>)
Branch: R3.1

commit 3aa73d49ed477c997cf3438349a3262af52e1ba6
Author: Nischal Sheth <email address hidden>
Date: Mon Feb 13 14:07:49 2017 -0800

Fix initialization of configured families for bgp neighbor

The code used to rely on bgp open messages exchanged with the remote
router to handle the negotiation. This does not work as desired in the
case where there are multiple representations for a bgp-router. In the
scenario described in the bug, there was a bgp-router object of type
control-node in cluster A (in which it actually exists) and another
bgp-router object of type external-control-node in cluster B (in order
to represent the same control-node in cluster B). The problem happened
because the bgp-routers were configured with different adddress families
for a legitimate reason. Another bgp-router in cluster B was configured
to peer with the external-control-node, but the actual bgp negotiation
obviously happens with the control-node in cluster A (and a different
set of address families).

Fix by skipping address families that are not configured on the remote
bgp-router when populating the address family list for a neighbor.

Change-Id: I6d130cc59673dcdc42013678b4f93f6f6dfafad2
Closes-Bug: 1664343
(cherry picked from commit 519c27ad335dc9db7b7788d5f1321b46b3b5e1c7)