diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-08-17 16:50:58 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-19 13:29:33 +0900 |
commit | 79ed96fdc1a171de4b13108c7ca9c154d6d7fcd4 (patch) | |
tree | bfd691f15f5a369d1717112cc95d61cf19d843a4 /table/table_manager_test.go | |
parent | c14a63575c62addaf96c78f4de9aef6e3c430f0f (diff) |
table: fix best path selection which considers local asn
TableManager.localAsn wasn't used.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager_test.go')
-rw-r--r-- | table/table_manager_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/table/table_manager_test.go b/table/table_manager_test.go index 5a875c9b..08791867 100644 --- a/table/table_manager_test.go +++ b/table/table_manager_test.go @@ -38,6 +38,7 @@ func getLogger(lv log.Level) *log.Logger { func peerR1() *PeerInfo { peer := &PeerInfo{ AS: 65000, + LocalAS: 65000, ID: net.ParseIP("10.0.0.3").To4(), LocalID: net.ParseIP("10.0.0.1").To4(), Address: net.ParseIP("10.0.0.1").To4(), @@ -48,6 +49,7 @@ func peerR1() *PeerInfo { func peerR2() *PeerInfo { peer := &PeerInfo{ AS: 65100, + LocalAS: 65000, Address: net.ParseIP("10.0.0.2").To4(), } return peer @@ -56,6 +58,7 @@ func peerR2() *PeerInfo { func peerR3() *PeerInfo { peer := &PeerInfo{ AS: 65000, + LocalAS: 65000, ID: net.ParseIP("10.0.0.2").To4(), LocalID: net.ParseIP("10.0.0.1").To4(), Address: net.ParseIP("10.0.0.3").To4(), @@ -967,7 +970,6 @@ func TestProcessBGPUpdate_5_select_low_med_ipv6(t *testing.T) { func TestProcessBGPUpdate_6_select_ebgp_path_ipv4(t *testing.T) { tm := NewTableManager("TestProcessBGPUpdate_6_select_ebgp_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) - tm.localAsn = uint32(65000) var err error @@ -1052,7 +1054,6 @@ func TestProcessBGPUpdate_6_select_ebgp_path_ipv4(t *testing.T) { func TestProcessBGPUpdate_6_select_ebgp_path_ipv6(t *testing.T) { tm := NewTableManager("TestProcessBGPUpdate_6_select_ebgp_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) - tm.localAsn = uint32(65000) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -1142,7 +1143,6 @@ func TestProcessBGPUpdate_6_select_ebgp_path_ipv6(t *testing.T) { func TestProcessBGPUpdate_7_select_low_routerid_path_ipv4(t *testing.T) { tm := NewTableManager("TestProcessBGPUpdate_7_select_low_routerid_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) - tm.localAsn = uint32(65000) var err error @@ -1227,7 +1227,6 @@ func TestProcessBGPUpdate_7_select_low_routerid_path_ipv4(t *testing.T) { func TestProcessBGPUpdate_7_select_low_routerid_path_ipv6(t *testing.T) { tm := NewTableManager("TestProcessBGPUpdate_7_select_low_routerid_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) - tm.localAsn = uint32(65000) var err error origin1 := bgp.NewPathAttributeOrigin(0) |