summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-02-16 15:03:32 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-02-16 15:03:32 +0900
commitf64bc7f8f799cb5045bfd1a808517f999b4ce496 (patch)
tree45c47b61fcae92e7329c85476793d6318217a52e /packet
parent9c5d7e389756d2fba66af757de3451749a1f26c5 (diff)
packet: fix AS4PathParam parser type conversion
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet')
-rw-r--r--packet/bgp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 173d7698..cc2166c2 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -1295,7 +1295,7 @@ func (a *As4PathParam) DecodeFromBytes(data []byte) error {
a.Type = data[0]
a.Num = data[1]
data = data[2:]
- if len(data) < int(a.Num*4) {
+ if len(data) < int(a.Num)*4 {
return NewMessageError(eCode, eSubCode, nil, "AS4 param data length is short")
}
for i := 0; i < int(a.Num); i++ {