fw: add all satisfied PIT entry nonces to dead nonce list on multi-match Data - #212
Open
Harsh23Kashyap wants to merge 1 commit into
Open
Harsh23Kashyap wants to merge 1 commit into
Harsh23Kashyap wants to merge 1 commit into
Conversation
…tch Data When a Data packet satisfies multiple PIT entries (e.g. one CanBePrefix and one exact-match Interest), the forwarding loop inserted the out-record nonces of only the first matching entry into the dead nonce list, once per entry. Nonces used upstream for the remaining entries were never recorded, so a looped Interest carrying one of those nonces is not detected and can circulate until its PIT entry expires. Use the loop variable so every satisfied entry's out-record nonces are added, matching the single-match path. Add a regression test that satisfies two PIT entries with one Data packet and checks both nonces land in the dead nonce list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #209.
Summary
When a Data packet satisfies more than one PIT entry (e.g. a CanBePrefix Interest for /a and an exact-match Interest for /a/b), the satisfy loop in processIncomingData inserted the out-record nonces of pitEntries[0] into the dead nonce list once per entry, and never recorded the nonces of the remaining entries. A looped Interest carrying one of those unrecorded nonces is then not detected and gets forwarded again until its PIT entry expires.
The fix uses the loop variable pitEntry, matching the single-match branch directly above.
Repro evidence
Go 1.26.6, linux/amd64, ndnd main @ d51682b.
Regression test against unpatched main:
Same test against this branch:
Testing