summaryrefslogtreecommitdiffhomepage
path: root/pkg/packet
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/packet')
-rw-r--r--pkg/packet/mrt/mrt.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/packet/mrt/mrt.go b/pkg/packet/mrt/mrt.go
index 377ce8ab..70788325 100644
--- a/pkg/packet/mrt/mrt.go
+++ b/pkg/packet/mrt/mrt.go
@@ -363,11 +363,11 @@ type RibEntry struct {
isAddPath bool
}
-var notAllRibEntryBytesAvailable = errors.New("not all RibEntry bytes are available")
+var errNotAllRibEntryBytesAvailable = errors.New("not all RibEntry bytes are available")
func (e *RibEntry) DecodeFromBytes(data []byte) ([]byte, error) {
if len(data) < 8 {
- return nil, notAllRibEntryBytesAvailable
+ return nil, errNotAllRibEntryBytesAvailable
}
e.PeerIndex = binary.BigEndian.Uint16(data[:2])
e.OriginatedTime = binary.BigEndian.Uint32(data[2:6])
@@ -390,7 +390,7 @@ func (e *RibEntry) DecodeFromBytes(data []byte) ([]byte, error) {
}
attrLen -= uint16(p.Len())
if len(data) < p.Len() {
- return nil, notAllRibEntryBytesAvailable
+ return nil, errNotAllRibEntryBytesAvailable
}
data = data[p.Len():]
e.PathAttributes = append(e.PathAttributes, p)