diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-08-10 20:02:29 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-11 07:13:49 +0900 |
commit | 54092b2703c6df26e40787696a9ac8afbacb5b5e (patch) | |
tree | a475f04ab0f460b10a5927d1b7b9b0be4d2f0e91 /server | |
parent | 331721e167b1d43213acf77f5c039b8b7b5c0c17 (diff) |
config: rename distributed-policy to in-policy
Diffstat (limited to 'server')
-rw-r--r-- | server/peer.go | 4 | ||||
-rw-r--r-- | server/server.go | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/server/peer.go b/server/peer.go index 86479c99..0d7e2369 100644 --- a/server/peer.go +++ b/server/peer.go @@ -331,7 +331,7 @@ func (peer *Peer) setDistributePolicy(policyMap map[string]*policy.Policy) { // configure distribute policy policyConf := peer.conf.ApplyPolicy distPolicies := make([]*policy.Policy, 0) - for _, policyName := range policyConf.ApplyPolicyConfig.DistributePolicy { + for _, policyName := range policyConf.ApplyPolicyConfig.InPolicy { log.WithFields(log.Fields{ "Topic": "Peer", "Key": peer.conf.NeighborConfig.NeighborAddress, @@ -343,7 +343,7 @@ func (peer *Peer) setDistributePolicy(policyMap map[string]*policy.Policy) { } } peer.distPolicies = distPolicies - peer.defaultDistributePolicy = policyConf.ApplyPolicyConfig.DefaultDistributePolicy + peer.defaultDistributePolicy = policyConf.ApplyPolicyConfig.DefaultInPolicy } func (peer *Peer) applyDistributePolicies(original *table.Path) (bool, *table.Path) { diff --git a/server/server.go b/server/server.go index b6e8843a..502acae4 100644 --- a/server/server.go +++ b/server/server.go @@ -1302,7 +1302,7 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { conOutPolicyNames := peer.conf.ApplyPolicy.ApplyPolicyConfig.ExportPolicy resOutPolicies = extract(conOutPolicyNames) - distPolicyNames := peer.conf.ApplyPolicy.ApplyPolicyConfig.DistributePolicy + distPolicyNames := peer.conf.ApplyPolicy.ApplyPolicyConfig.InPolicy resDistPolicies = extract(distPolicyNames) defaultInPolicy := policy.ROUTE_REJECT @@ -1356,8 +1356,8 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { if reqApplyPolicy.DefaultDistributePolicy != policy.ROUTE_ACCEPT { defDistPolicy = config.DEFAULT_POLICY_TYPE_REJECT_ROUTE } - applyPolicy.DefaultDistributePolicy = defDistPolicy - applyPolicy.DistributePolicy = policy.PoliciesToString(reqApplyPolicy.DistributePolicies) + applyPolicy.DefaultInPolicy = defDistPolicy + applyPolicy.InPolicy = policy.PoliciesToString(reqApplyPolicy.DistributePolicies) } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_IMPORT { applyPolicy.DefaultImportPolicy = config.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE applyPolicy.ImportPolicy = make([]string, 0) @@ -1365,8 +1365,8 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { applyPolicy.DefaultExportPolicy = config.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE applyPolicy.ExportPolicy = make([]string, 0) } else if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_DEL_DISTRIBUTE { - applyPolicy.DefaultDistributePolicy = config.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE - applyPolicy.DistributePolicy = make([]string, 0) + applyPolicy.DefaultInPolicy = config.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE + applyPolicy.InPolicy = make([]string, 0) } if grpcReq.RequestType == REQ_NEIGHBOR_POLICY_ADD_DISTRIBUTE || |