Correctly set EDNS buffer size through 'edns_details'#1429
Merged
tgreenx merged 1 commit intozonemaster:release-v2024.2.1from Feb 24, 2025
Merged
Correctly set EDNS buffer size through 'edns_details'#1429tgreenx merged 1 commit intozonemaster:release-v2024.2.1from
tgreenx merged 1 commit intozonemaster:release-v2024.2.1from
Conversation
It seems that setting the 'edns_size' parameter to the underlying Zonemaster::LDNS resolver object isn't sufficient when Zonemaster::LDNS::query_with_pkt() is used. We have to explicitly set it in the given Zonemaster::LDNS::Packet object.
marc-vanderwal
approved these changes
Feb 13, 2025
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.
Purpose
This PR proposes a fix to EDNS queries sent with
edns_details(and withoutedns_details->size, so in test cases Nameserver{02, 10, 11, 12} which were not functioning properly - queries were sent but with an empty EDNS buffer size (0), so some name servers could not respond properly).The cause seems that to be that setting the
edns_sizeparameter to the underlyingZonemaster::LDNSresolver object isn't sufficient whenZonemaster::LDNS::query_with_pkt()is used. It bypasses the resolver-level properties, see ldns_resolver_send_pkt() vs ldns_resolver_send() - and in particular the omitted call to ldns_resolver_prepare_query_pkt(). We have to explicitly set it in the givenZonemaster::LDNS::Packetobject.Context
Fixes #1428
Changes
edns_detailsHow to test this PR
This is not caught in current unit tests for several reasons:
Manual testing (from #1428):