summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-21 20:33:34 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-21 20:33:34 -0800
commitd84250491a53d3aefc00fe643d5bb45aea83b757 (patch)
tree9a75f09ba2c764ce1f40e52f90091bf0b5cf6940 /server
parent73d7ec4471158abd320c056dc28ed76708f6ba65 (diff)
server: update AdjRibOut table
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go
index ab80e9bf..4dbc6c73 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -84,6 +84,7 @@ func (peer *Peer) handlePeermessage(m *message) {
pList, wList, _ := peer.rib.ProcessPaths(m.data.([]table.Path))
// TODO: merge multiple messages
// TODO: 4bytes and 2bytes conversion.
+ adjPathLists := append([]table.Path(nil), pList...)
msgs := make([]*bgp.BGPMessage, 0)
for _, p := range pList {
@@ -98,8 +99,12 @@ func (peer *Peer) handlePeermessage(m *message) {
draw := p.GetNlri().(*bgp.WithdrawnRoute)
m := bgp.NewBGPUpdateMessage([]bgp.WithdrawnRoute{*draw}, []bgp.PathAttributeInterface{}, []bgp.NLRInfo{})
msgs = append(msgs, m)
+
+ adjPathLists = append(adjPathLists, p.Clone(true))
}
+ peer.adjRib.UpdateOut(adjPathLists)
+
for _, m := range msgs {
peer.outgoing <- m
}