3.1.5.6 Receiving an AUTHORITY Message

On receipt of an AUTHORITY message, the PNRP node MUST first check whether the AUTHORITY message conforms to the syntax as specified in section 2.2.2.6, and drop the message if not. Otherwise, look in the Pending List for a LOOKUP message or INQUIRE message whose Message ID matches the Acked Message ID in the AUTHORITY message. If none is found, drop the message.

The PNRP node MUST then check whether the AUTHORITY_BUFFER message is fragmented by comparing the Size field in the AUTHORITY message and the received message size. If the AUTHORITY_BUFFER message is not fragmented, it MUST be processed as specified in section 3.1.5.6.1. Otherwise, the PNRP node MUST start the reassembly process as follows:

To reassemble fragmented packets into the original AUTHORITY message, a PNRP node MUST use the Message ID from the PNRP Header and the source IP address and Port to look for an existing entry in the Reassembly List. If no entry exists, the node MUST attempt to create one and drop the message if it cannot create one. Otherwise, continue processing as follows.

Check whether the length of the Buffer field (as computed from the UDP message size) plus the Offset value is greater than the Size value, and if so, drop the message and delete the existing reassembly state.

Check if the Size in the AUTHORITY message received matches the Size in the reassembly entry, and if not, drop the message and delete the existing reassembly state. Otherwise, continue processing as follows:

For all fragments, a PNRP node MUST copy the AUTHORITY_BUFFER message at the offset as specified in the AUTHORITY message.

If the AUTHORITY_BUFFER message is still not completely reassembled, no further processing is necessary. After the last fragment is received, processing MUST be done on the reassembled AUTHORITY_BUFFER message.