Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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

tool_operate: more defensive socket code #14304

Closed
wants to merge 1 commit into from
Closed

Conversation

bagder
Copy link
Member

@bagder bagder commented Jul 29, 2024

  • use 'struct sockaddr' to getsockname() and its sa_family member

  • use 'curl_socklen_t' instead of 'socklen_t'

  • check for AF_INET6 to exist instead assuming it does

Reported-by: Harry Sintonen

- use 'struct sockaddr' to getsockname() and its sa_family member

- use 'curl_socklen_t' instead of 'socklen_t'

- check for AF_INET6 to exist instead assuming it does

Reported-by: Harry Sintonen
@dfandrich
Copy link
Contributor

dfandrich commented Jul 29, 2024 via email

@bagder
Copy link
Member Author

bagder commented Jul 29, 2024

I'm guessing the removal of the __TANDEM fix was an accident.

Actually not. This uses sockaddr and not sockaddr_storage so it uses sa_family and not ss_family which I presume has different conditions. If this works in CI I'll ask @rsbeckerca to verify.

@bagder
Copy link
Member Author

bagder commented Jul 29, 2024

@rsbeckerca can you check if this version builds fine for you on NonStop? It seems like a generally more portable approach.

@rsbeckerca
Copy link
Contributor

@rsbeckerca can you check if this version builds fine for you on NonStop? It seems like a generally more portable approach.

Yes. $DAYJOB is kicking my ____ I will get to this shortly.

@bagder
Copy link
Member Author

bagder commented Jul 30, 2024

I'll go ahead and merge this in the mean time as this helps other platforms and I suspect it works on NonStop as well.

@bagder bagder closed this in abdf612 Jul 30, 2024
@bagder bagder deleted the bagder/iptos-safer branch July 30, 2024 07:11
@rsbeckerca
Copy link
Contributor

Build on NonStop works. Starting test suite.

@rsbeckerca
Copy link
Contributor

@bagder LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants