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

Generate the compressionHelper functions #454

Merged
merged 2 commits into from
Feb 17, 2017
Merged

Generate the compressionHelper functions #454

merged 2 commits into from
Feb 17, 2017

Conversation

miekg
Copy link
Owner

@miekg miekg commented Feb 14, 2017

This was a long standing TODO: generate the compression helper
functions. This now automatically picks up new names that can be
used for compression.

This was a long standing TODO: generate the compression helper
functions. This now automatically picks up new names that can be
used for compression.

When packing add names to compression map:

When packing a message we should only compress when compress is true.
But whenever the compression map is not nil we should still add names
to it that can be *used* for future compression. The packing
inadvertently only added those names when compress would be true.
@gpaul
Copy link

gpaul commented Feb 17, 2017

This fixes the issue I was seeing. 👍

@miekg miekg merged commit 74ec3b2 into master Feb 17, 2017
@miekg miekg deleted the compression-fix branch June 4, 2017 12:30
pierresouchay added a commit to pierresouchay/consul that referenced this pull request Mar 21, 2018
See hashicorp#3977

While trying to improve furthermore hashicorp#3948 (This pull request is still valid since we are not using Compression to compute the result anyway).

I saw a strange behaviour of dns library.
Basically, msg.Len() and len(msg.Pack()) disagree on Message len.

Thus, calculation of DNS response is false consul relies on msg.Len() instead of the result of Pack()

This is linked to miekg/dns#453 and a fix has been provided with miekg/dns#454

Would it be possible to upgrade miekg/dns to a more recent function ?

Consul might for instance upgrade to a post 1.0 release such as https://github.com/miekg/dns/releases/tag/v1.0.4
preetapan pushed a commit to hashicorp/consul that referenced this pull request Mar 28, 2018
See #3977

While trying to improve furthermore #3948 (This pull request is still valid since we are not using Compression to compute the result anyway).

I saw a strange behaviour of dns library.
Basically, msg.Len() and len(msg.Pack()) disagree on Message len.

Thus, calculation of DNS response is false consul relies on msg.Len() instead of the result of Pack()

This is linked to miekg/dns#453 and a fix has been provided with miekg/dns#454

Would it be possible to upgrade miekg/dns to a more recent function ?

Consul might for instance upgrade to a post 1.0 release such as https://github.com/miekg/dns/releases/tag/v1.0.4
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