From b85f6ccfec193fe629171fd2241399a13cace7da Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 23 Jan 2015 21:53:31 +0900 Subject: packet: fix PathAttributeMpReachNLRI's DecodeFromBytes Signed-off-by: FUJITA Tomonori --- packet/bgp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packet/bgp.go') 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] -- cgit v1.2.3