Same token body structure for Non-Shared-State and Shared-State
nqv opened this issue · comments
At the moment, the token body of those are a bit different:
Non-Shared-State Retry Service Token {
Token Type (1) = 0,
ODCIL (7) = 8..20,
RSCIL (8) = 0..20,
Original Destination Connection ID (64..160),
Retry Source Connection ID (0..160),
Opaque Data (..),
}
Shared-State Retry Service Token Body {
ODCIL (8) = 0..20,
RSCIL (8) = 0..20,
[Port (16)],
Original Destination Connection ID (0..160),
Retry Source Connection ID (0..160),
Timestamp (64),
Opaque Data (..),
}
I wonder if we can unify them into one, something like
Token Body {
Token Type (1) = 0,
ODCIL (7) = 8..20,
RSCIL (8) = 0..20,
Original Destination Connection ID (0..160),
Retry Source Connection ID (0..160),
Timestamp (64),
Opaque Data (..),
}
I think timestamp should be included for both and Port can be included in Opaque Data if needed?
The timestamp is not needed for non-shared state; the server is not doing any validation, and only needs the fields that it has to put in transport parameters.
The port is part of the validation process; for shared-state, both the Retry Service and the server need access to it. It therefore can't be opaque data.