diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-02 21:52:50 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-02 22:25:05 +0900 |
commit | ac34370d4a7850265e719abb9ac5155b2f1dd523 (patch) | |
tree | 07a3a45f59c9d6d8727d4f31b9f95e8a883e862d /server/server.go | |
parent | 3313e8f8d63e0b502d6324d4d900f32776e11130 (diff) |
*: another s/distribute/in
distribute-policy is deprecated name.
We chose to use the name in-policy.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 12 |
1 files changed, 6 insertions, 6 deletions
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()] |