RecordFlux icon indicating copy to clipboard operation
RecordFlux copied to clipboard

Ignore field value when reading, enforce it when writing

Open senier opened this issue 3 years ago • 1 comments

RFC message formats often have a definition of reserved fields such that should be forced to a particular values (zero, most of the time), but on reception any value should be accepted.

senier avatar Mar 10 '21 15:03 senier

One example would be the reserved field in IPv6:

 Reserved            8-bit reserved field.  Initialized to zero for
                     transmission; ignored on reception.

There are also more complex cases like in DTLS 1.3:

legacy_record_version This value MUST be set to {254, 253} for all records other than the initial ClientHello (i.e., one not generated after a HelloRetryRequest), where it may also be {254, 255} for compatibility purposes. It MUST be ignored for all purposes.

Cf. https://github.com/Componolit/systematization-binary-schemas/issues/55

treiher avatar Mar 10 '21 15:03 treiher