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

Fix agent connection in TCP mode on Windows XP #2329

Merged
merged 3 commits into from Jan 14, 2019
Merged

Fix agent connection in TCP mode on Windows XP #2329

merged 3 commits into from Jan 14, 2019

Conversation

vikman90
Copy link
Member

@vikman90 vikman90 commented Jan 11, 2019

Fixes
#951

As explained at the issue comment, the network API for Windows does not support the flag MSG_WAITALL in recv(). This prevents the agent from connecting to the manager in TCP mode on Windows XP.

Solution

We implemented the os_recv_waitall() function to emulate the WAITALL behavior. We changed OS_RecvSecureTCP() to use that function and replaced calls to recv() in:

  • start_agent.c: Connection handshake.
  • receiver.c: Incoming message handler for UNIX.
  • receiver-win.c: Incoming message handler for Windows.

Tests

  1. Agent connection in TCP mode.
  2. Log reporting.
  3. Shared configuration delivery.
  4. Agent restart via Active response.

Platforms

  • Windows XP SP2 x32
  • Windows XP SP3 x32
  • Windows Server 2016 x64
  • Debian 9
  • CentOS 7
  • FreeBSD 11.2

@vikman90 vikman90 added type/bug Something isn't working module/agent Issues related to the agent daemon labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/agent Issues related to the agent daemon type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants