Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

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

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

Already on GitHub? # to your account

New Feature: EDNS settings #61

Closed
MichaCo opened this issue Mar 11, 2020 · 0 comments
Closed

New Feature: EDNS settings #61

MichaCo opened this issue Mar 11, 2020 · 0 comments

Comments

@MichaCo
Copy link
Owner

MichaCo commented Mar 11, 2020

Up to version 1.2.0, EDNS was always enabled without an option to opt out.
EDNS is used to inform the DnsServer that the client can handle bigger UDP buffers then the default maximum of 512 bytes.
This information is sent via an additional OPT record, and the response must include an "answer" OPT record which contains the buffer size the server is willing to handle.

The OPT record can also request DNSSEC records by setting the Do bit. DnsClient didn't do that so far.

Both things can now be changed and disabled or enabled via configuration!

New properties on the configuration object which gets passed into LookupClient or Query overloads:

ExtendedDnsBufferSize

The default value is 4096 and you usually don't have to change that.
But you can. Setting this property to <= 512 (and leaving RequestDnsSecRecords=false) will disable EDNS and will not send an OPT record.

RequestDnsSecRecords

Is disabled per default. If set to true, the Do bit will be set and the response might contain DNSSEC records.
DnsClient does not validate those records, but if someone wants to, the records and the raw bytes will be available in the response.

Enabled EDNS Example

(These are the default settings which do not have to be set/changed)

var dns = new LookupClient(NameServer.GooglePublicDns);

var result = dns.Query("google.com", QueryType.A, queryOptions: new DnsQueryAndServerOptions()
{
    RequestDnsSecRecords = false,
    ExtendedDnsBufferSize = 4096
});

Disabled EDNS Example

Both settings can enable EDNS, so both have to be set to disable it completely.

var dns = new LookupClient(NameServer.GooglePublicDns);

var result = dns.Query("google.com", QueryType.A, queryOptions: new DnsQueryAndServerOptions()
{
    RequestDnsSecRecords = false,
    ExtendedDnsBufferSize = 512
});
@MichaCo MichaCo added this to the 1.3.0 milestone Mar 11, 2020
@MichaCo MichaCo self-assigned this Mar 11, 2020
@MichaCo MichaCo closed this as completed Jun 20, 2021
Repository owner locked and limited conversation to collaborators Jun 20, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant