Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First stab at implementing draft-ietf-sidrops-8210bis-14 #126

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix comment and warning
job committed Aug 7, 2024
commit 244d5c342466c1d6ac2be3c471d354a17ab09cd1
4 changes: 2 additions & 2 deletions lib/structs.go
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ const (
// Maximum size of ASPA PDU payload:
// * header + length field: 8 bytes
// * Customer ASID: 4 bytes
// * 10,001 providers * 32bit = 80,008 bytes
// * 20,002 providers * 32bit = 80,008 bytes
messageMaxSize = 80020

PROTOCOL_VERSION_0 = 0
@@ -603,7 +603,7 @@ func Decode(rdr io.Reader) (PDU, error) {
return nil, fmt.Errorf("wrong length: %d < 8", length)
}
if length > messageMaxSize {
return nil, fmt.Errorf("wrong length: %d > %d", length, messageMaxSize)
return nil, fmt.Errorf("PDU too large: %d > %d", length, messageMaxSize)
}

toread := make([]byte, length - 8)