Skip to content
Snippets Groups Projects
Commit 2218d1bb authored by Maximilian Wilhelm's avatar Maximilian Wilhelm
Browse files

Include OriginatorID and ClusterList when computing BGPPath hash.


  Also update expected hash value (now includes OriginatorID + ClusterList).

Signed-off-by: default avatarMaximilian Wilhelm <max@sdn.clinic>
parent ef25b574
No related branches found
No related tags found
No related merge requests found
......@@ -331,6 +331,8 @@ func (b *BGPPath) ComputeHash() string {
b.BGPIdentifier,
b.Source,
b.Communities,
b.OriginatorID,
b.ClusterList,
b.LargeCommunities,
b.PathIdentifier)
......
......@@ -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())
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment