summaryrefslogtreecommitdiffhomepage
path: root/table/table_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/table_test.go')
-rw-r--r--table/table_test.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/table/table_test.go b/table/table_test.go
index 0ece7568..f957cef1 100644
--- a/table/table_test.go
+++ b/table/table_test.go
@@ -107,7 +107,7 @@ func TableCreatePath(peerT []*PeerInfo) []*Path {
nlriList := updateMsgT.NLRI
pathAttributes := updateMsgT.PathAttributes
nlri_info := nlriList[0]
- pathT[i] = NewPath(peerT[i], &nlri_info, false, pathAttributes, false, time.Now(), false)
+ pathT[i] = NewPath(peerT[i], nlri_info, false, pathAttributes, false, time.Now(), false)
}
return pathT
}
@@ -127,9 +127,8 @@ func updateMsgT1() *bgp.BGPMessage {
med,
}
- nlri := []bgp.NLRInfo{*bgp.NewNLRInfo(24, "10.10.10.0")}
- withdrawnRoutes := []bgp.WithdrawnRoute{}
- return bgp.NewBGPUpdateMessage(withdrawnRoutes, pathAttributes, nlri)
+ nlri := []*bgp.IPAddrPrefix{bgp.NewIPAddrPrefix(24, "10.10.10.0")}
+ return bgp.NewBGPUpdateMessage(nil, pathAttributes, nlri)
}
func updateMsgT2() *bgp.BGPMessage {
@@ -147,9 +146,8 @@ func updateMsgT2() *bgp.BGPMessage {
med,
}
- nlri := []bgp.NLRInfo{*bgp.NewNLRInfo(24, "20.20.20.0")}
- withdrawnRoutes := []bgp.WithdrawnRoute{}
- return bgp.NewBGPUpdateMessage(withdrawnRoutes, pathAttributes, nlri)
+ nlri := []*bgp.IPAddrPrefix{bgp.NewIPAddrPrefix(24, "20.20.20.0")}
+ return bgp.NewBGPUpdateMessage(nil, pathAttributes, nlri)
}
func updateMsgT3() *bgp.BGPMessage {
origin := bgp.NewPathAttributeOrigin(0)
@@ -165,8 +163,8 @@ func updateMsgT3() *bgp.BGPMessage {
med,
}
- nlri := []bgp.NLRInfo{*bgp.NewNLRInfo(24, "30.30.30.0")}
- w1 := bgp.WithdrawnRoute{*bgp.NewIPAddrPrefix(23, "40.40.40.0")}
- withdrawnRoutes := []bgp.WithdrawnRoute{w1}
+ nlri := []*bgp.IPAddrPrefix{bgp.NewIPAddrPrefix(24, "30.30.30.0")}
+ w1 := bgp.NewIPAddrPrefix(23, "40.40.40.0")
+ withdrawnRoutes := []*bgp.IPAddrPrefix{w1}
return bgp.NewBGPUpdateMessage(withdrawnRoutes, pathAttributes, nlri)
}