Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 633
    • Issues 633
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 88
    • Merge requests 88
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Merge requests
  • !6128

TLSDNS: call send callbacks only after the data was sent

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Artem Boldariev requested to merge 3271-tlsdns-call-write-callbacks-after-send into main Apr 13, 2022
  • Overview 6
  • Commits 1
  • Pipelines 5
  • Changes 3

This commit ensures that write callbacks are getting called only after the data has been sent via the network.

Without this fix, a situation could appear when a write callback could get called before the actual encrypted data would have been sent to the network. Instead, it would get called right after it would have been passed to the OpenSSL (i.e. encrypted).

Most likely, the issue does not reveal itself often because the callback call was asynchronous, so in most cases it should have been called after the data has been sent, but that was not guaranteed by the code logic.

Also, this commit removes one memory allocation (netievent) from a hot path, as there is no need to call this callback asynchronously anymore.

Closes #3271 (closed)

Edited Apr 27, 2022 by Artem Boldariev
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 3271-tlsdns-call-write-callbacks-after-send