3.1.5.2 DFRAMEs

Data frames (DFRAME) are checked to see if they were sent from an address (for example, IPv4 address and port tuple when running on UDP) to which there is an established connection. If the address is unknown, the packet MUST be discarded.

If the connection enabled signing, and the DFRAME is not properly signed, it MUST be discarded.

If the remote computer system reported a version 0x00010005 or higher and the PACKET_CONTROL_KEEPALIVE_OR_CORRELATE bit was set in bControl, the packet is a KeepAlive and MUST contain the 32-bit session identifier as a payload. This identifier value MUST match the dwSessID value used to establish the connection, and receivers MUST ignore the packet if it does not match. The PACKET_CONTROL_COALESCE flag MUST NOT be set in bControl on KeepAlives. This payload MUST NOT be indicated to the upper layer as data.

All DFRAMEs, KeepAlive or otherwise, MUST have their bNRcv, bSeq, optional selective acknowledgment (SACK) mask, and optional send mask fields processed as described in sections 3.1.5.2.1 through 3.1.5.2.4. After the sequencing information is validated, and processing indicates that the data is either in sequence or was not marked as PACKET_COMMAND_SEQUENTIAL in bCommand, the implementation SHOULD report the data payload or coalesced data payloads, if any, to its consumer. The exception is version 0x00010005 and higher KeepAlives, which SHOULD be treated as if they have a 0-byte payload as previously noted.

All successfully validated DFRAME packets SHOULD count as a valid receive and thus restart the KeepAlive Timer (section 3.1.2.6).

If the DFRAME has the PACKET_CONTROL_END_STREAM flag set, implementations SHOULD begin the process of disconnecting gracefully as described in section 3.1.4.3.