3.1.7.27 Validating a Received Record

The Record Data field in a received FLOOD message MUST conform to the format of a PEER_RECORD. In addition, it MUST meet the following conditions:

  • The FLOOD data size MUST be at least 90.

  • Creator ID Length MUST be at least 2 and at most 256.

  • The Record ID MUST be validated according to the following steps:

    • A 128 bit value, hash, MUST be generated as the MD5 hash of the value of the Creator ID field.

    • A 64 bit value, highVal, MUST be generated by XORing the high-order 64 bits of hash with the low-order 64 bits of hash.

    • The value of highVal MUST match the high-order 64 bits of the Record ID.

  • Last Modified By ID Length MUST be either zero or between 2 and 256, inclusive.

  • Expiration Time MUST be greater than Last Modification Time.

  • Last Modification Time MUST be at least Creation Time.

  • Graph ID Length MUST be between 2 and 256, inclusive.

  • Graph ID MUST match the graph ID of the local graph.

  • Protocol Version MUST be 0x0100.

  • If the Record Deleted bit is set, Payload Data Size MUST be zero.

  • Payload Data Size + (Attributes Length * 2) MUST be no greater than Max Record Size.

  • If Last Modification Time and Creation Time are identical, then Last Modified By ID Length MUST be 0.

  • If present, the attributes data MUST conform with the attribute syntax specified in section 2.2.3.5.

If any of the above conditions are not met by the PEER_RECORD, the local node MUST discard it without further processing.

After the PEER_RECORD is validated, the record MUST be passed to the graph security provider for further validation. The graph security provider MUST return one of the following three responses:

  • Valid - The record is valid, and MUST be processed further.

  • Invalid - The record is invalid for some reason. The record MUST NOT be processed further.

  • Defer Validation - The record could not be validated yet, but the graph security provider expects to be able to attempt validation in the future. The record MUST be placed in the Deferred record List. The Record MUST NOT be processed further at this time.

  • Any response other than the above MUST be discarded without any action being taken in response.