Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fw: do not validate packets after parse #81

Merged
merged 2 commits into from
Dec 25, 2024
Merged

fw: do not validate packets after parse #81

merged 2 commits into from
Dec 25, 2024

Conversation

pulsejet
Copy link
Collaborator

spec.ReadPacket validates the digest on Interests if app params are present. This is unnecessary for forwarding.

@@ -442,3 +442,10 @@ func (op *NDNLPLinkServiceOptions) Flags() (ret uint64) {
}
return
}

// Reads a packet without validating the internal fields
func ReadPacketFast(reader enc.ParseReader) (*spec.Packet, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be better named ReadPacketUnverified or ReadPacketRaw.
The word Fast make people think it is a faster alternative with no cost.

spec.ReadPacket validates the digest on Interests if app params are
present. This is unnecessary for forwarding.
@pulsejet pulsejet merged commit e5c2033 into main Dec 25, 2024
8 checks passed
@pulsejet pulsejet deleted the parse-fast branch December 25, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants