3.1.5.6.1 Receiving an AUTHORITY_BUFFER

When a PNRP node has a fully-formed AUTHORITY_BUFFER message, the PNRP node MUST first check whether the AUTHORITY_BUFFER message conforms to the syntax as specified in section 2.2.2.6.1, and ignore the buffer if not.

Otherwise, the PNRP node MUST remove the entry (as specified in section 3.1.5.6) from the Pending List.

The Outstanding Resolves Table MUST then be checked to find an entry that sent a LOOKUP message during a resolution. The ACKed Packet ID of the AUTHORITY message is compared against LastSentMessageID in the resolved entries to find a match. If no entry is found, the node MUST follow the steps as specified in section 3.1.5.6.1.1. Otherwise, continue processing as follows:

  1. Add the address used when sending the previous LOOKUP message to the resolve entry's ResolvePath.

  2. Increment the entry's TotalUsefulHops.

  3. If the L flag in the AUTHORITY_BUFFER message is set, increment the resolve entry's SuspiciousCount.

  4. If the N flag in the AUTHORITY_BUFFER message is clear, begin validating the route entry in the resolve entry's CurrentNextHop, as specified in section 3.1.5.11. Otherwise clear CurrentNextHop because the PNRP ID is no longer registered at that node and remove this node from the cache. In either case, continue processing as follows.

  5. If CurrentNextHop is not empty and if the PNRP ID of the route entry in the resolve entry's CurrentNextHop is numerically closer to the Target PNRP ID than the PNRP ID of the resolve entry's CurrentBestMatch, push CurrentBestMatch onto BestMatchStack, create a copy of the resolve entry's CurrentNextHop, and then save the copy in the resolve entry's CurrentBestMatch.

  6. If the resolve entry's CurrentNextHop is not empty and the UseCount of the entry is 3, then clear the resolve entry's CurrentNextHop.

  7. If the Route Entry field is present in the AUTHORITY_BUFFER message then create a route entry and store it in the resolve entry's NewNextHop.

  8. If the resolve entry's CurrentNextHop is not empty, push it back onto NextHopStack and clear the resolve entry's CurrentNextHop.

  9. If the resolve entry's NewNextHop is not empty, check the addresses in the route entry to ensure that none of them appear in the resolve entry's ResolvePath except for the last entry in the path. If the address appears, clear the resolve entry's NewNextHop.

  10. If the resolve entry's NewNextHop is not empty, check to see if the resolve entry's NewNextHop is numerically closer to the Target PNRP ID than the node from which the NewNextHop was obtained. If the resolve entry's NewNextHop is closer, push it onto the resolve entry's NextHopStack. If it is not closer, but the cache contains fewer than eight entries, push it onto the resolve entry's NextHopStack. If the cache has more than eight entries, pop the Previous hop off of the resolve entry's NextHopStack if it was pushed on in step 8. Clear the resolve entry's NewNextHop.

  11. Resume at step 7 in section 3.1.4.4.2.