diff options
-rw-r--r-- | packet/bgp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index c11cc25c..da15c9bf 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -1878,7 +1878,7 @@ func (p *PathAttributeMpReachNLRI) DecodeFromBytes(data []byte) error { afi := binary.BigEndian.Uint16(value[0:2]) safi := value[2] nexthopLen := value[3] - if len(value) < int(4+nexthopLen) { + if len(value) < 4 + int(nexthopLen) { return NewMessageError(eCode, eSubCode, value, "mpreach nexthop length is short") } nexthopbin := value[4 : 4+nexthopLen] |