Skip to content

Commit

Permalink
Reject bgpaas sessions from iBGP peers
Browse files Browse the repository at this point in the history
Change-Id: Idc5b42175674936700bf06cd31804cf46b421f6d
Closes-Bug: 1734731
  • Loading branch information
Nischal Sheth committed Jan 10, 2018
1 parent 0a4d7c1 commit 050b032
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bgp/bgp_session_manager.cc
Expand Up @@ -223,6 +223,16 @@ bool BgpSessionManager::ProcessSession(BgpSession *session) {
return true;
}

// Ignore if the peer is IBGP and a BGPaaS client since we do not
// support that combination.
if (peer->PeerType() == BgpProto::IBGP &&
peer->router_type() == "bgpaas-client") {
session->SendNotification(BgpProto::Notification::Cease,
BgpProto::Notification::ConnectionRejected);
DeleteSession(session);
return true;
}

peer->AcceptSession(session);
return true;
}
Expand Down

0 comments on commit 050b032

Please sign in to comment.