Skip to content

Commit

Permalink
Use upper bound for ASPA PDU as max size
Browse files Browse the repository at this point in the history
  • Loading branch information
ties committed May 4, 2024
1 parent 0a5d5cd commit 3b91cfa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ type Logger interface {
}

const (
// arbitrary threshold. First power of two over 4*|asns in DFZ|
messageMaxSize = 1048576
// We use the size of the largest sensible PDU.
//
// We ignore the theoretically unbounded length of SKIs for router keys.
// RPs should validate that this has the correct length.
//
// maximum size of ASPA PDU payload:
// * 2^16 providers * 32bit = 262144 bytes
// * length is inclusive of header: 8 bytes
// * flags/afi flags/provider as/customer AS: 16 bytes
messageMaxSize = 262168

PROTOCOL_VERSION_0 = 0
PROTOCOL_VERSION_1 = 1
Expand Down

0 comments on commit 3b91cfa

Please sign in to comment.