summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp/validate.go
diff options
context:
space:
mode:
authorJeff Bean <bean@uber.com>2018-06-22 19:12:33 -0700
committerJeff Bean <bean@uber.com>2018-06-22 19:12:33 -0700
commit154650594c5b40b2905eb73b90f52de72f6ced16 (patch)
tree2ba6ffe099ff216a92df7fb3806eb9aeaa988208 /packet/bgp/validate.go
parent954562d65a90af4e8d2e9bf29e4c2bccc4420b38 (diff)
Fixing all megacheck errors.
Diffstat (limited to 'packet/bgp/validate.go')
-rw-r--r--packet/bgp/validate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp/validate.go b/packet/bgp/validate.go
index 1b8f27c9..60cf26e4 100644
--- a/packet/bgp/validate.go
+++ b/packet/bgp/validate.go
@@ -274,7 +274,7 @@ func validateAsPathValueBytes(data []byte) (bool, error) {
return false, NewMessageError(eCode, eSubCode, nil, "AS PATH the number of AS is incorrect")
}
segLength := int(asNum)
- if use4byte == true {
+ if use4byte {
segLength *= 4
} else {
segLength *= 2