From ef65699c8c8bfc2b0177a645ea9e12df097285ab Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Thu, 26 Mar 2015 08:54:56 +0000 Subject: server: remove nexthop field from Path struct and make Path.setNexthop public Signed-off-by: ISHIDA Wataru --- server/peer.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/peer.go') 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() -- cgit v1.2.3