mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
server: check if local table exists for a neighbor
Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
5f2b37d487
commit
daa2cbb7a3
@@ -957,6 +957,14 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg {
|
||||
// However, peer haven't target importpolicy when add PolicyDefinition of name only to the list.
|
||||
conInPolicyNames := peer.config.ApplyPolicy.ImportPolicies
|
||||
loc := server.localRibMap[peer.config.NeighborAddress.String()]
|
||||
if loc == nil {
|
||||
result := &GrpcResponse{
|
||||
ResponseErr: fmt.Errorf("no local rib for %s", peer.config.NeighborAddress.String()),
|
||||
}
|
||||
grpcReq.ResponseCh <- result
|
||||
close(grpcReq.ResponseCh)
|
||||
break
|
||||
}
|
||||
for _, conInPolicyName := range conInPolicyNames {
|
||||
match := false
|
||||
for _, inPolicy := range loc.importPolicies {
|
||||
|
||||
Reference in New Issue
Block a user