diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-08 10:57:43 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-08 13:13:34 +0900 |
commit | 9298e5eeca78e8bb02ff34b500add622b73b4f5f (patch) | |
tree | 857f7646d93ba770527e61edd76dd1838b440249 /table/table_test.go | |
parent | 89b904b7417932e78c8c6fea2ad5d8a35891b0a4 (diff) |
*: kill bgp.NLRInfo and bgp.WithdrawnRoute
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table_test.go')
-rw-r--r-- | table/table_test.go | 18 |
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) } |