summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-23 21:53:31 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-23 21:55:07 +0900
commitb85f6ccfec193fe629171fd2241399a13cace7da (patch)
tree01071d45fee96d30807f84d9eee64d3af4ddbd22 /packet/bgp.go
parentd5908d902b27a761e9b1b447ef022e1e32219305 (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.go2
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]