diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-07-02 17:28:15 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-07-03 06:29:07 +0900 |
commit | b7b1e18eec86ade7694a3e2ffa2d1c4e00b80006 (patch) | |
tree | 38e741497e3e5500977c5e4a35b5469be8aa33ab /server/server.go | |
parent | 6d9f671f493e03ddad3f8abd03351f35dc0381ab (diff) |
server: update path attrs when sending update msg out
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go index b6fcc363..683fcc6d 100644 --- a/server/server.go +++ b/server/server.go @@ -513,7 +513,7 @@ func (server *BgpServer) propagateUpdate(neighborAddress string, RouteServerClie } f := filterpath(targetPeer, sendPathList) for _, path := range f { - path.SetNexthop(targetPeer.config.LocalAddress) + path.UpdatePathAttrs(&server.bgpConfig.Global, &targetPeer.config) } targetPeer.adjRib.UpdateOut(f) msgList := table.CreateUpdateMsgFromPaths(f) @@ -563,7 +563,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *fsmMsg, incoming chan * peer.config.LocalAddress = peer.fsm.LocalAddr() for _, path := range peer.getBests(globalRib) { p := path.Clone(path.IsWithdraw) - p.SetNexthop(peer.config.LocalAddress) + p.UpdatePathAttrs(&server.bgpConfig.Global, &peer.config) pathList = append(pathList, p) } } |