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

Improvements for hostname resolving routines #548

Merged
merged 14 commits into from Apr 14, 2019

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Apr 5, 2019

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


This PR adds a few micro-optimizations and a bug fix for the host name resolving routines.

Improvement:

  • Do not add host names of clients and upstream servers if they haven't changed.

Bug fix:

  • Any determined host name was allocated using strdup(). However, as a consecutive free() was missing, some memory got lost.

This template was created based on the work of udemy-dl.

…nged. Currently, we are storing their host names each time we reresolve the IP addresses, even if they have been found to be identical. This allows us to save memory in FTL processes that are running for a long time without being restarted.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER changed the base branch from development to release/v4.3 April 5, 2019 10:11
@DL6ER
Copy link
Member Author

DL6ER commented Apr 5, 2019

Please do not consider this PR a blocker. If 4.3 will be released before this PR has been tested, feel free to rebase this PR onto development.

resolve.c Outdated Show resolved Hide resolved
resolve.c Outdated Show resolved Hide resolved
resolve.c Outdated Show resolved Hide resolved
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER marked this pull request as ready for review April 12, 2019 14:31
resolve.c Show resolved Hide resolved
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from AzureMarker April 14, 2019 12:25
resolve.c Outdated Show resolved Hide resolved
resolve.c Outdated Show resolved Hide resolved
…l higher

Signed-off-by: DL6ER <dl6er@dl6er.de>
resolve.c Show resolved Hide resolved
Signed-off-by: DL6ER <dl6er@dl6er.de>
resolve.c Outdated Show resolved Hide resolved
…s is sometimes a bit cumbersome, however, it is necessary as we cannot completely lock the routines because this would prevent DNS resolution from being able to work

Signed-off-by: DL6ER <dl6er@dl6er.de>
resolve.c Outdated Show resolved Hide resolved
…he client/forward loops

Signed-off-by: DL6ER <dl6er@dl6er.de>
@AzureMarker AzureMarker reopened this Apr 14, 2019
@AzureMarker AzureMarker merged commit d161f9b into release/v4.3 Apr 14, 2019
@AzureMarker AzureMarker deleted the tweak/resolve_improvements branch April 14, 2019 19:47
@DL6ER DL6ER mentioned this pull request Apr 15, 2019
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

2 participants