bgpd: Don't prevent views from being able to connect

Views are perfectly valid and should be allowed to connect.
In a bgp instance scenario the vrf_id will always be UNKNOWN,
so allow it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-03-06 10:40:53 -05:00
parent 0ff3b1118b
commit dded74d578

View File

@ -310,7 +310,8 @@ void bgp_timer_set(struct peer *peer)
status start timer is on unless peer is shutdown or peer is status start timer is on unless peer is shutdown or peer is
inactive. All other timer must be turned off */ inactive. All other timer must be turned off */
if (BGP_PEER_START_SUPPRESSED(peer) || !peer_active(peer) if (BGP_PEER_START_SUPPRESSED(peer) || !peer_active(peer)
|| peer->bgp->vrf_id == VRF_UNKNOWN) { || (peer->bgp->inst_type != BGP_INSTANCE_TYPE_VIEW &&
peer->bgp->vrf_id == VRF_UNKNOWN)) {
BGP_TIMER_OFF(peer->t_start); BGP_TIMER_OFF(peer->t_start);
} else { } else {
BGP_TIMER_ON(peer->t_start, bgp_start_timer, BGP_TIMER_ON(peer->t_start, bgp_start_timer,
@ -1422,7 +1423,8 @@ int bgp_start(struct peer *peer)
return 0; return 0;
} }
if (peer->bgp->vrf_id == VRF_UNKNOWN) { if (peer->bgp->inst_type != BGP_INSTANCE_TYPE_VIEW &&
peer->bgp->vrf_id == VRF_UNKNOWN) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
flog_err( flog_err(
EC_BGP_FSM, EC_BGP_FSM,