diff --git a/route/bgp_path.go b/route/bgp_path.go index b9bd1216aac42a563480fd5cfdfbf531ec31fa6d..333758bd497a2de2d9fa1da21a49c162cfdba3dd 100644 --- a/route/bgp_path.go +++ b/route/bgp_path.go @@ -331,6 +331,8 @@ func (b *BGPPath) ComputeHash() string { b.BGPIdentifier, b.Source, b.Communities, + b.OriginatorID, + b.ClusterList, b.LargeCommunities, b.PathIdentifier) diff --git a/route/bgp_test.go b/route/bgp_test.go index f399d5d51ab96ad1a5b789a22aceb4d7b2490932..760306af6c0006479fd2c8c401581b57eff5ab48 100644 --- a/route/bgp_test.go +++ b/route/bgp_test.go @@ -36,9 +36,9 @@ func TestComputeHash(t *testing.T) { Source: bnet.IPv4(4), } - assert.Equal(t, "98d68e69d993f8807c561cc7d63de759f7edc732887f88a7ebf42f61b9e54821", p.ComputeHash()) + assert.Equal(t, "1058916ff3e6a51c7d8a47945d13fc3fcd8ee578a6d376505f46d58979b30fae", p.ComputeHash()) p.LocalPref = 150 - assert.NotEqual(t, "98d68e69d993f8807c561cc7d63de759f7edc732887f88a7ebf42f61b9e54821", p.ComputeHash()) + assert.NotEqual(t, "1058916ff3e6a51c7d8a47945d13fc3fcd8ee578a6d376505f46d58979b30fae", p.ComputeHash()) }