summaryrefslogtreecommitdiffhomepage
path: root/table/destination.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 /table/destination.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 'table/destination.go')
-rw-r--r--table/destination.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/table/destination.go b/table/destination.go
index 73cae66c..2954c699 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -41,12 +41,11 @@ const (
)
type PeerInfo struct {
- AS uint32
- ID net.IP
- VersionNum int
- LocalID net.IP
- RF bgp.RouteFamily
- Address net.IP
+ AS uint32
+ ID net.IP
+ LocalID net.IP
+ RF bgp.RouteFamily
+ Address net.IP
}
type Destination interface {
@@ -172,11 +171,10 @@ func (dd *DestinationDefault) addNewPath(newPath Path) {
func (dd *DestinationDefault) removeOldPathsFromSource(source *PeerInfo) []Path {
removePaths := make([]Path, 0)
- sourceVerNum := source.VersionNum
tempKnownPathList := make([]Path, 0)
for _, path := range dd.knownPathList {
- if path.getSource() == source && path.getSourceVerNum() < sourceVerNum {
+ if path.getSource() == source {
removePaths = append(removePaths, path)
} else {
tempKnownPathList = append(tempKnownPathList, path)