summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-03 23:05:23 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-04 20:30:51 +0900
commit52ddad958f10ae9ea7ab8c40130825c903d08c52 (patch)
tree4097992e648a41e75928e89dad134ff67abfff37 /server/peer.go
parenta3cb22a9027b4fd9f360f873b976472aad4ae173 (diff)
table: remove Path's source version
Even if a connection with peer is down and up, table code gets BGPmessages belonging the first connection before the event of the peer down in order. So we don't need source version stuff inherent from Ryu BGP code. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/peer.go b/server/peer.go
index a54a8af4..516fc24e 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -84,11 +84,10 @@ func NewPeer(g config.GlobalType, peer config.NeighborType, serverMsgCh chan *se
p.rf = bgp.RF_IPv6_UC
}
p.peerInfo = &table.PeerInfo{
- AS: peer.PeerAs,
- VersionNum: 1,
- LocalID: g.RouterId,
- RF: p.rf,
- Address: peer.NeighborAddress,
+ AS: peer.PeerAs,
+ LocalID: g.RouterId,
+ RF: p.rf,
+ Address: peer.NeighborAddress,
}
p.adjRib = table.NewAdjRib()
p.rib = table.NewTableManager()
@@ -256,9 +255,6 @@ func (peer *Peer) loop() error {
peer.sendMessages(table.CreateUpdateMsgFromPaths(pathList))
peer.fsm.peerConfig.BgpNeighborCommonState.Uptime = time.Now()
peer.fsm.peerConfig.BgpNeighborCommonState.EstablishedCount++
- if oldState >= bgp.BGP_FSM_OPENSENT {
- peer.peerInfo.VersionNum++
- }
}
if oldState == bgp.BGP_FSM_ESTABLISHED {
peer.fsm.peerConfig.BgpNeighborCommonState.Uptime = time.Time{}