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

dnsdist: Mark the remote member of DownstreamState as const #6688

merged 2 commits into from May 29, 2018


Copy link

@rgacogne rgacogne commented May 29, 2018

Short description

While investigating #6664, I noticed that we pass the remote member to functions that could alter it, like Socket::recvFrom(). At the moment I don't see how it could have led to having a different port in the end, since we use a connected socket, but it's still not very clean.
As there is no reason to alter remote and some other members after the object construction, this PR marks them as const so we are prevented from passing them to a function that might alter their content.


I have:

  • read the document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@rgacogne rgacogne added this to the dnsdist-1.3.x milestone May 29, 2018
@rgacogne rgacogne merged commit b7bf243 into PowerDNS:master May 29, 2018
@rgacogne rgacogne deleted the dnsdist-const-ds-remote branch May 29, 2018 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants