diff --git a/protocols/bgp/packet/path_attributes.go b/protocols/bgp/packet/path_attributes.go index 071a7c55b0f0c6207dcd124ff2d36043ab00365a..f238cfd65037c01437144d387aee5ed030e2601d 100644 --- a/protocols/bgp/packet/path_attributes.go +++ b/protocols/bgp/packet/path_attributes.go @@ -261,8 +261,7 @@ func (pa *PathAttribute) decodeCommunities(buf *bytes.Buffer) error { return fmt.Errorf("Unable to read next hop: buf.Read read %d bytes", n) } - v := fourBytesToUint32(c) - coms[i] = v + coms[i] = fourBytesToUint32(c) } pa.Value = coms