diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-24 20:45:53 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-25 20:15:04 +0900 |
commit | 7ec6a96962637d0c6f525ec6e8dd517f785842c7 (patch) | |
tree | 9a0b2f65e7221be2e01cb7e152c48fa5cb8f32f5 /pkg | |
parent | ae52d609352a4e0211c5ae2e3104703cdb94eb50 (diff) |
api: move RouterId to PeerState from PeerConf
It's not configuration.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/server/grpc_server.go | 4 | ||||
-rw-r--r-- | pkg/server/server.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go index ae317bb4..b82dc59a 100644 --- a/pkg/server/grpc_server.go +++ b/pkg/server/grpc_server.go @@ -589,9 +589,9 @@ func newNeighborFromAPIStruct(a *api.Peer) (*config.Neighbor, error) { } pconf.State.LocalCapabilityList = localCaps pconf.State.RemoteCapabilityList = remoteCaps - } - pconf.State.RemoteRouterId = a.Conf.Id + pconf.State.RemoteRouterId = a.State.RouterId + } for _, af := range a.AfiSafis { afiSafi := config.AfiSafi{} diff --git a/pkg/server/server.go b/pkg/server/server.go index 3e5c5ebf..833bc6e9 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -3564,7 +3564,6 @@ func (s *BgpServer) MonitorPeer(ctx context.Context, r *api.MonitorPeerRequest, PeerAs: msg.PeerAS, LocalAs: msg.LocalAS, NeighborAddress: msg.PeerAddress.String(), - Id: msg.PeerID.String(), NeighborInterface: msg.PeerInterface, }, State: &api.PeerState{ @@ -3573,6 +3572,7 @@ func (s *BgpServer) MonitorPeer(ctx context.Context, r *api.MonitorPeerRequest, NeighborAddress: msg.PeerAddress.String(), SessionState: api.PeerState_SessionState(int(msg.State) + 1), AdminState: api.PeerState_AdminState(msg.AdminState), + RouterId: msg.PeerID.String(), }, Transport: &api.Transport{ LocalAddress: msg.LocalAddress.String(), |