diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-23 21:53:31 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-23 21:55:07 +0900 |
commit | b85f6ccfec193fe629171fd2241399a13cace7da (patch) | |
tree | 01071d45fee96d30807f84d9eee64d3af4ddbd22 /packet/bgp.go | |
parent | d5908d902b27a761e9b1b447ef022e1e32219305 (diff) |
packet: fix PathAttributeMpReachNLRI's DecodeFromBytes
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp.go')
-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] |