summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-27 19:49:57 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-27 19:49:57 +0900
commit94f35998f5f54ea56d9f0971eab85c09fe7c6bd3 (patch)
treecc6bbb518af2ae37f40fc7b31923aff19b884cf0
parent28ff2fa2ec6ae6e6e0e2d2bfb35820ac086e49b1 (diff)
server: remove REQ_INITIALIZE_RPKI
Let's simply configure ROA stuff in Server's Start method. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--server/server.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/server/server.go b/server/server.go
index 10ee11aa..e7d15d94 100644
--- a/server/server.go
+++ b/server/server.go
@@ -851,16 +851,6 @@ func (s *BgpServer) StartZebraClient(x *config.Zebra) (err error) {
}
func (server *BgpServer) SetRpkiConfig(c []config.RpkiServer) error {
- ch := make(chan *GrpcResponse)
- server.GrpcReqCh <- &GrpcRequest{
- RequestType: REQ_INITIALIZE_RPKI,
- Data: &server.bgpConfig.Global,
- ResponseCh: ch,
- }
- if err := (<-ch).Err(); err != nil {
- return err
- }
-
for _, s := range c {
ch := make(chan *GrpcResponse)
server.GrpcReqCh <- &GrpcRequest{
@@ -1257,6 +1247,8 @@ func (s *BgpServer) Start(c *config.Global) (err error) {
// update route selection options
table.SelectionOptions = c.RouteSelectionOptions.Config
table.UseMultiplePaths = c.UseMultiplePaths.Config
+
+ s.roaManager.SetAS(s.bgpConfig.Global.Config.As)
}
return nil
}
@@ -1623,9 +1615,6 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) {
}
grpcReq.ResponseCh <- &GrpcResponse{Data: &api.SoftResetNeighborResponse{}}
close(grpcReq.ResponseCh)
- case REQ_INITIALIZE_RPKI:
- g := grpcReq.Data.(*config.Global)
- grpcDone(grpcReq, server.roaManager.SetAS(g.Config.As))
case REQ_ADD_RPKI, REQ_DELETE_RPKI, REQ_ENABLE_RPKI, REQ_DISABLE_RPKI, REQ_RESET_RPKI, REQ_SOFT_RESET_RPKI:
server.handleModRpki(grpcReq)
case REQ_ROA, REQ_GET_RPKI: