summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2017-05-05 08:48:21 -0400
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-05-09 02:52:29 -0700
commit485b88244076b76a4bc1cef7b0630b3e70703fda (patch)
tree21c45e3655d233aa9ebab7fd571389e61c57c4a3 /server
parent86d9587f757fe728996d36c4acfbf7417fda4fb2 (diff)
api: fix api/server struct conversion
convert default in/import/export policy type remove remote-private-as, send-community since we are not using them Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go
index cf9c183d..bd977b85 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -532,7 +532,6 @@ func (peer *Peer) ToConfig(getAdvertised bool) *config.Neighbor {
conf.State.RemoteCapabilityList = remoteCap
conf.State.LocalCapabilityList = capabilitiesFromConfig(peer.fsm.pConf)
- conf.State.RemoteRouterId = peer.fsm.peerInfo.ID.To4().String()
conf.State.SessionState = config.IntToSessionStateMap[int(peer.fsm.state)]
conf.State.AdminState = config.IntToAdminStateMap[int(peer.fsm.adminState)]
@@ -552,6 +551,7 @@ func (peer *Peer) ToConfig(getAdvertised bool) *config.Neighbor {
buf, _ := peer.fsm.recvOpen.Serialize()
// need to copy all values here
conf.State.ReceivedOpenMessage, _ = bgp.ParseBGPMessage(buf)
+ conf.State.RemoteRouterId = peer.fsm.peerInfo.ID.To4().String()
}
return &conf
}