From ac34370d4a7850265e719abb9ac5155b2f1dd523 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Wed, 2 Sep 2015 21:52:50 +0900 Subject: *: another s/distribute/in distribute-policy is deprecated name. We chose to use the name in-policy. Signed-off-by: ISHIDA Wataru --- server/server.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/server.go') diff --git a/server/server.go b/server/server.go index c5c57ddf..eb9bcee9 100644 --- a/server/server.go +++ b/server/server.go @@ -1466,8 +1466,8 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { grpcReq.ResponseCh <- result close(grpcReq.ResponseCh) - case REQ_NEIGHBOR_POLICY_ADD_IMPORT, REQ_NEIGHBOR_POLICY_ADD_EXPORT, REQ_NEIGHBOR_POLICY_ADD_DISTRIBUTE, - REQ_NEIGHBOR_POLICY_DEL_IMPORT, REQ_NEIGHBOR_POLICY_DEL_EXPORT, REQ_NEIGHBOR_POLICY_DEL_DISTRIBUTE: + case REQ_NEIGHBOR_POLICY_ADD_IMPORT, REQ_NEIGHBOR_POLICY_ADD_EXPORT, REQ_NEIGHBOR_POLICY_ADD_IN, + REQ_NEIGHBOR_POLICY_DEL_IMPORT, REQ_NEIGHBOR_POLICY_DEL_EXPORT, REQ_NEIGHBOR_POLICY_DEL_IN: peer, err := server.checkNeighborRequest(grpcReq) if err != nil { break @@ -1489,7 +1489,7 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { } applyPolicy.DefaultExportPolicy = defOutPolicy applyPolicy.ExportPolicy = policy.PoliciesToString(reqApplyPolicy.ExportPolicies) - } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_ADD_DISTRIBUTE { + } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_ADD_IN { if reqApplyPolicy.DefaultInPolicy != policy.ROUTE_ACCEPT { defDistPolicy = config.DEFAULT_POLICY_TYPE_REJECT_ROUTE } @@ -1501,13 +1501,13 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_EXPORT { applyPolicy.DefaultExportPolicy = config.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE applyPolicy.ExportPolicy = make([]string, 0) - } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_DISTRIBUTE { + } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_IN { applyPolicy.DefaultInPolicy = config.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE applyPolicy.InPolicy = make([]string, 0) } - if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_ADD_DISTRIBUTE || - grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_DISTRIBUTE { + if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_ADD_IN || + grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_IN { peer.setPolicy(reqPolicyMap) } else { loc, ok := server.localRibMap[peer.conf.NeighborConfig.NeighborAddress.String()] -- cgit v1.2.3