Skip to content
Snippets Groups Projects
Commit ead4524a authored by Oliver Herms's avatar Oliver Herms
Browse files

Fix magic number

parent 75242749
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ import (
)
const (
pathIdentifierLen = 4
PathIdentifierLen = 4
)
// NLRI represents a Network Layer Reachability Information
......@@ -63,7 +63,7 @@ func decodeNLRI(buf *bytes.Buffer, afi uint16, addPath bool) (*NLRI, uint8, erro
return nil, consumed, errors.Wrap(err, "Unable to decode path identifier")
}
consumed += pathIdentifierLen
consumed += PathIdentifierLen
}
pfxLen, err := buf.ReadByte()
......
......@@ -132,7 +132,7 @@ func (u *UpdateSender) sender(aggrTime time.Duration) {
budget -= int(packet.BytesInAddr(pfx.Pfxlen())) + 1
if u.options.UseAddPath {
budget -= 4
budget -= packet.PathIdentifierLen
}
if budget < 0 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment