Disable hostname resolution in agent start up#3405
Merged
Conversation
da30eb1 to
35e5a73
Compare
Contributor
Author
Valgrind report |
3b80228 to
03a7d53
Compare
vikman90
requested changes
May 29, 2019
Member
vikman90
left a comment
There was a problem hiding this comment.
@albertomn86 Thanks!
The code is great, but I get these logs when the agent cannot resolve the address:
- Linux:
2019/05/29 15:49:15 ossec-agentd: INFO: Server IP Address: estretch/
- Windows:
2019/05/29 06:57:28 ossec-agent[4872] start_agent.c:63 at connect_server(): DEBUG: Discarding connection to 'ef4.wazuh.co/'. Could not resolve hostname.
Such messages should not include the /.
Cheers.
snaow
approved these changes
Jun 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the hostname resolution during the configuration reading in the agent start up.
If the DNS is not reachable when the agent is starting, the config validation aborts the starting.
Removing this validation, the agent is now able to resolve the hostname once it has started.
This PR also improves some messages related with the agent connection.
Tests