From 52ddad958f10ae9ea7ab8c40130825c903d08c52 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 3 Jan 2015 23:05:23 +0900 Subject: 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 --- server/peer.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'server/peer.go') 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{} -- cgit v1.2.3