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

Prevent Remoted from exiting when a client closes a connection prematurely #4390

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

vikman90
Copy link
Member

@vikman90 vikman90 commented Dec 23, 2019

Related issue
#3816

Description

Remoted may exit abruptly if a client (an agent) closes a connection before Remoted accepts it. This PR aims to let Remoted:

  • Report a debugging message on this condition.
  • Report a non-critical error on any other accept() call error.

Logs/Alerts example

2019/12/23 05:18:54 ossec-remoted[3961] secure.c:172 at HandleSecure(): DEBUG: (1242): Couldn't accept TCP connections: Software caused connection abort (103)

Tests

  • Compilation on Linux.
  • Scan Build on Linux.

@vikman90 vikman90 added type/bug Something isn't working module/remote labels Dec 23, 2019
@vikman90 vikman90 requested a review from snaow December 23, 2019 13:24
@vikman90 vikman90 self-assigned this Dec 23, 2019
@vikman90
Copy link
Member Author

Scan Build

No reports for file secure.c.

@chemamartinez chemamartinez self-requested a review January 9, 2020 12:01
Copy link
Contributor

@chemamartinez chemamartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vikman90 vikman90 merged commit 5a6f81a into 3.11 Jan 9, 2020
@vikman90 vikman90 deleted the 3816-remoted-accept branch January 9, 2020 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/remote type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants