-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
alorbach
commented
Dec 16, 2022
- Add handling for other ERRNO codes in tcp.c for AIX
- Fix commands in some tests that were not correctly handled on AIX.
For send(), recv() and connect() we need to handle different ERRNO codes on AIX according to doc: https://www.ibm.com/docs/en/aix/7.1?topic=r-recv-subroutine https://www.ibm.com/docs/en/aix/7.1?topic=s-send-subroutine https://www.ibm.com/docs/en/aix/7.1?topic=c-connect-subroutine
@@ -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.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
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().
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Those commands were not correctly handeled on AIX, now they are. AIX: Changed ERRNO handling after connect in tcp.c see also: rsyslog#250
3f7b916
to
44aa863
Compare