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

Change default value to 1232 #6183

Merged
merged 3 commits into from Jul 10, 2023
Merged

Conversation

pemensik
Copy link
Contributor

@pemensik pemensik commented Jun 30, 2023

As specified by DNS flag day 2020, good and decent default value avoiding fragmentation issues should be 1232. It is quite likely 1500 would work reliably on local ethernet networks.

Value 512 is set implicitly and must be used for all clients, which did not include OPT RR with explicit value they support.

Since MR #5368 it should work correctly.

1. Why is this pull request needed and what does it do?

Changes EDNS0 default value to recommended value.

2. Which issues (if any) are related?

3. Which documentation changes (if any) need to be made?

4. Does this introduce a backward incompatible change or deprecation?

It removes the confusion around EDNS0 size. It may create behaviour change.

@pemensik pemensik requested a review from ykhr53 as a code owner June 30, 2023 16:06
As specified by DNS flag day 2020, good and decent default value
avoiding fragmentation issues should be 1232. It is quite likely 1500
would work reliably on local ethernet networks.

Value 512 is set implicitly and must be used for all clients, which did
not include OPT RR with explicit value they support.

Since MR coredns#5368 it should work correctly.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
@pemensik
Copy link
Contributor Author

pemensik commented Jun 30, 2023

I think this plugin is somehow too simple. It can only further reduce EDNS accepted size after #5366. It is not able to add EDNS header to forwarded query, which I think documentation for it suggests.

It can only reduce accepted response size for queries, which already has EDNS0 header.

@pemensik
Copy link
Contributor Author

I think the example, which uses bufsize with forward plugin, creates confusion. It were originally able to add EDNS0 header to forwarded query. After MR #5368 it cannot do that anymore. There are cases where adding EDNS0 header is desired. But in case the response is larger than originating client query allowed, it would have to return response with TC bit set and EDNS0 header removed. That seems not possible anymore.

@pemensik
Copy link
Contributor Author

Related change in OpenShift: openshift/cluster-dns-operator#370

@pemensik
Copy link
Contributor Author

It seems to me similar algorithm should be made as in #4085. When incoming query arrives, it should be safe to set internal supported EDNS0 size on the forwarded query. When the answer arrives, OPT RR may need to be removed from response, if it were not in original request.

Copy link
Collaborator

@Tantalor93 Tantalor93 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, LGTM! would be nice to include it into 1.11.0 release
FYI @chrisohaver

Copy link
Collaborator

@Tantalor93 Tantalor93 left a comment

Choose a reason for hiding this comment

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

oh, looks like TestSetupBufsize needs to be updated. Shame on me for approving before triggering pipelines 🙂

@chrisohaver
Copy link
Member

chrisohaver commented Jul 4, 2023

I’d like to review all recent PRs/issues relating to Edns before they merge.

@Tantalor93
Copy link
Collaborator

FYI @pemensik all commits must be signed https://github.com/coredns/coredns/pull/6183/checks?check_run_id=14770904337 🙂

@pemensik
Copy link
Contributor Author

pemensik commented Jul 4, 2023

Okay, I think it is ready for review now.

@pemensik pemensik requested a review from Tantalor93 July 4, 2023 16:00
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #6183 (d85844f) into master (93c57b6) will increase coverage by 3.27%.
The diff coverage is 60.72%.

❗ Current head d85844f differs from pull request most recent head 7eeeddc. Consider uploading reports for the commit 7eeeddc to get more accurate results

@@            Coverage Diff             @@
##           master    #6183      +/-   ##
==========================================
+ Coverage   55.70%   58.97%   +3.27%     
==========================================
  Files         224      248      +24     
  Lines       10016    16154    +6138     
==========================================
+ Hits         5579     9527    +3948     
- Misses       3978     6041    +2063     
- Partials      459      586     +127     
Impacted Files Coverage Δ
core/dnsserver/config.go 0.00% <ø> (ø)
core/dnsserver/register.go 13.79% <0.00%> (-4.19%) ⬇️
plugin/auto/auto.go 0.00% <0.00%> (ø)
plugin/auto/xfr.go 0.00% <0.00%> (ø)
plugin/auto/zone.go 78.94% <ø> (+0.68%) ⬆️
plugin/autopath/autopath.go 73.61% <ø> (-1.39%) ⬇️
plugin/azure/azure.go 10.61% <0.00%> (-0.57%) ⬇️
plugin/azure/setup.go 56.36% <0.00%> (-4.14%) ⬇️
plugin/backend_lookup.go 0.00% <0.00%> (ø)
plugin/bind/bind.go 50.00% <0.00%> (-50.00%) ⬇️
... and 78 more

... and 165 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@chrisohaver chrisohaver left a comment

Choose a reason for hiding this comment

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

Thanks! The flag-day advised default value LGTM. Minor changes to wording in docs requested.

plugin/bufsize/README.md Outdated Show resolved Hide resolved
plugin/bufsize/README.md Outdated Show resolved Hide resolved
Copy link
Member

@chrisohaver chrisohaver left a comment

Choose a reason for hiding this comment

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

lgtm thanks!

Copy link
Collaborator

@Tantalor93 Tantalor93 left a comment

Choose a reason for hiding this comment

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

TestSetupBufsize needs adjustment https://github.com/coredns/coredns/actions/runs/5478594030/jobs/9979672394?pr=6183

Test 0: Bufsize not correctly set for input bufsize. Expected: 512, actual: 1232

@pemensik
Copy link
Contributor Author

pemensik commented Jul 7, 2023

TestSetupBufsize needs adjustment https://github.com/coredns/coredns/actions/runs/5478594030/jobs/9979672394?pr=6183

Test 0: Bufsize not correctly set for input bufsize. Expected: 512, actual: 1232

Ouch, I have force-pushed previous version with just corrected documentation. I have already fixed this.

Check also buffer size smaller than legacy value is not accepted.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
Mention also increasing request size is not possible, it can only reduce
the accepted size.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
Copy link
Collaborator

@Tantalor93 Tantalor93 left a comment

Choose a reason for hiding this comment

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

LGTM

@yongtang yongtang merged commit 52f0348 into coredns:master Jul 10, 2023
12 checks passed
jaehnri pushed a commit to jaehnri/coredns that referenced this pull request Jul 11, 2023
* Change default value to 1232

As specified by DNS flag day 2020, good and decent default value
avoiding fragmentation issues should be 1232. It is quite likely 1500
would work reliably on local ethernet networks.

Value 512 is set implicitly and must be used for all clients, which did
not include OPT RR with explicit value they support.

Since MR coredns#5368 it should work correctly.

Signed-off-by: Petr Menšík <pemensik@redhat.com>

* Adapt bufsize test to new default value

Check also buffer size smaller than legacy value is not accepted.

Signed-off-by: Petr Menšík <pemensik@redhat.com>

* Update bufsize documentation

Mention also increasing request size is not possible, it can only reduce
the accepted size.

Signed-off-by: Petr Menšík <pemensik@redhat.com>

---------

Signed-off-by: Petr Menšík <pemensik@redhat.com>
Signed-off-by: jaehnri <joao.henri.cr@gmail.com>
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.

None yet

4 participants