diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-29 23:49:18 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-29 23:49:18 +0900 |
commit | bf9e7d83896775728cd89a54e81f0fede9e0ac2f (patch) | |
tree | 5a78ba4ca533922599e0d92394bd19ccf97b5da8 | |
parent | effb32153615fc6521a9f43fb637b6c925773281 (diff) |
packet: fix as_path parser
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | packet/bgp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index dc32d45a..7c218103 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -1345,7 +1345,7 @@ func (p *DefaultAsPath) isValidAspath(data []byte) (bool, error) { if asNum == 0 || int(asNum) > math.MaxUint8 { return false, NewMessageError(eCode, eSubCode, nil, "AS PATH the number of AS is incorrect") } - segLength := asNum + segLength := int(asNum) if use4byte == true { segLength *= 4 } else { @@ -1367,7 +1367,7 @@ func (p *DefaultAsPath) isValidAspath(data []byte) (bool, error) { if err == nil { return false, nil } - return false, NewMessageError(eCode, eSubCode, nil, "can't not parse") + return false, NewMessageError(eCode, eSubCode, nil, "==== can't not parse") } type AsPathParamInterface interface { |