Copy sinfo.coords for safety

This commit is contained in:
Neil Alexander 2018-07-30 13:34:32 +01:00
parent ebb4ec7c33
commit c4e6894d6a
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -426,7 +426,8 @@ func (sinfo *sessionInfo) doSend(bs []byte) {
// To prevent using empty session keys
return
}
coords := sinfo.coords
var coords []byte
coords = append(coords, sinfo.coords...)
// Read IPv6 flowlabel field (20 bits).
// Assumes packet at least contains IPv6 header.
flowkey := uint64(bs[1]&0x0f)<<16 | uint64(bs[2])<<8 | uint64(bs[3])