diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/peer.go | 2 | ||||
-rw-r--r-- | server/server.go | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go index 68e67254..4160ba6e 100644 --- a/server/peer.go +++ b/server/peer.go @@ -242,7 +242,7 @@ func (peer *Peer) sendMessages(msgs []*bgp.BGPMessage) { func (peer *Peer) handleREST(restReq *api.RestRequest) { result := &api.RestResponse{} switch restReq.RequestType { - case api.REQ_LOCAL_RIB: + case api.REQ_LOCAL_RIB, api.REQ_GLOBAL_RIB: // just empty so we use ipv4 for any route family j, _ := json.Marshal(table.NewIPv4Table(0)) if peer.fsm.adminState != ADMIN_STATE_DOWN { diff --git a/server/server.go b/server/server.go index 19d7eeba..27570d5a 100644 --- a/server/server.go +++ b/server/server.go @@ -269,6 +269,12 @@ func (server *BgpServer) handleRest(restReq *api.RestRequest) { } restReq.ResponseCh <- result close(restReq.ResponseCh) + case api.REQ_GLOBAL_RIB: + msg := &serverMsg{ + msgType: SRV_MSG_API, + msgData: restReq, + } + server.globalRib.serverMsgCh <- msg case api.REQ_LOCAL_RIB, api.REQ_NEIGHBOR_SHUTDOWN, api.REQ_NEIGHBOR_RESET, api.REQ_NEIGHBOR_SOFT_RESET, api.REQ_NEIGHBOR_SOFT_RESET_IN, api.REQ_NEIGHBOR_SOFT_RESET_OUT, api.REQ_ADJ_RIB_IN, api.REQ_ADJ_RIB_OUT, |