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

Fixes network issues on AIX #251

Merged
merged 2 commits into from
Dec 20, 2022
Merged

Conversation

alorbach
Copy link
Member

  • Add handling for other ERRNO codes in tcp.c for AIX
  • Fix commands in some tests that were not correctly handled on AIX.

@rgerhards rgerhards self-assigned this Dec 16, 2022
@rgerhards rgerhards added this to the 1.11.0 milestone Dec 16, 2022
@rgerhards rgerhards added the bug label Dec 16, 2022
@@ -3382,7 +3383,11 @@ relpTcpSend(relpTcp_t *const pThis, relpOctet_t *const pBuf, ssize_t *const pLen
if(written == -1) {
switch(errno_save) {
case EAGAIN:
#if defined(_AIX)
// AIX Workarround handling other ERRNO codes
case 0:
case EINTR:

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

This encapsulates case EINTR: within defined(_AIX), is this intended?

Yes as far as I know we do not have "EINTR" in errno on other systems, typically it is set to "EAGAIN".

} else if(errno == 0) {
// Set mode to Retry if errno is 0, this actually happens on AIX 10.x
} else if( errno == 0 ||
errno == EINTR) {

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Did you receive that code during testing? According to DOC, this code only being used in connect() and not in recv() / send().

Choose a reason for hiding this comment

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

I think assignment of
errno = EINPROGRESS;
caused this as a side effect.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think assignment of errno = EINPROGRESS; caused this as a side effect.

perhaps yes, but that assignment was removed so I think we should be good now with this PR.

Choose a reason for hiding this comment

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

i agree. i didn't observe EINPROGRESS in recv / send after removal

@kortemik kortemik mentioned this pull request Dec 16, 2022
Those commands were not correctly handeled on AIX, now they are.

AIX: Changed ERRNO handling after connect in tcp.c

see also: rsyslog#250
@rgerhards rgerhards merged commit 8f32c67 into rsyslog:master Dec 20, 2022
@alorbach alorbach mentioned this pull request Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants