diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-03-26 08:54:56 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-04-04 20:47:52 +0900 |
commit | ef65699c8c8bfc2b0177a645ea9e12df097285ab (patch) | |
tree | 34932112eb289eb2d114d96f1366f736abf4af98 /server/peer.go | |
parent | 3febf8129ee052adf013b6f8559e9cb950f3cdd5 (diff) |
server: remove nexthop field from Path struct and make Path.setNexthop public
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go index 2c25b519..bfee8f49 100644 --- a/server/peer.go +++ b/server/peer.go @@ -630,6 +630,11 @@ func (peer *Peer) loop() error { peer.peerConfig.LocalAddress = peer.fsm.LocalAddr() for rf, _ := range peer.rfMap { pathList := peer.adjRib.GetOutPathList(rf) + if !peer.peerConfig.RouteServer.RouteServerClient { + for _, path := range pathList { + path.SetNexthop(peer.peerConfig.LocalAddress) + } + } peer.sendMessages(table.CreateUpdateMsgFromPaths(pathList)) } peer.fsm.peerConfig.BgpNeighborCommonState.Uptime = time.Now().Unix() |