summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorYujiOshima <yuji.oshima0x3fd@gmail.com>2015-11-06 10:05:52 +0900
committerYujiOshima <yuji.oshima0x3fd@gmail.com>2015-11-06 10:05:52 +0900
commit1cc19fd2800f047795473c5e2d6dbdfb86e24a70 (patch)
treec3fd52b4fbb2c7dfd7fa20cfa03a89ccdef4b29d /server
parent8d3ffc6fa47a6a86f3eca6702e9b741f0517ffbc (diff)
cmd/api: get peer remote router id not neighbor address
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go1
-rw-r--r--server/server.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go
index f3f25ddc..ceeca0c5 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -299,6 +299,7 @@ func (peer *Peer) ToApiStruct() *api.Peer {
conf := &api.PeerConf{
NeighborAddress: c.NeighborConfig.NeighborAddress.String(),
+ Id: peer.peerInfo.ID.To4().String(),
PeerAs: c.NeighborConfig.PeerAs,
LocalAs: c.NeighborConfig.LocalAs,
PeerType: uint32(c.NeighborConfig.PeerType),
diff --git a/server/server.go b/server/server.go
index 67499076..386e82f3 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1766,6 +1766,7 @@ func (server *BgpServer) handleGrpcModNeighbor(grpcReq *GrpcRequest) (sMsgs []*S
var pconf config.Neighbor
if a.Conf != nil {
pconf.NeighborAddress = net.ParseIP(a.Conf.NeighborAddress)
+ pconf.NeighborConfig.NeighborAddress = net.ParseIP(a.Conf.NeighborAddress)
pconf.NeighborConfig.PeerAs = a.Conf.PeerAs
pconf.NeighborConfig.LocalAs = a.Conf.LocalAs
if pconf.NeighborConfig.PeerAs != server.bgpConfig.Global.GlobalConfig.As {