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

Client "failed to dial: invalid argument" on s390x big-endian architecture #54

Closed
rposts opened this issue May 4, 2021 · 2 comments
Closed

Comments

@rposts
Copy link

rposts commented May 4, 2021

Hi there,

I am trying to build Calico on s390x architecture which uses this package for SCTP related logic. I noticed that client would not connect to server spitting out following message:

/tmp/gotest/sctp/example# ./example -port 1000 -ip localhost
2021/05/04 08:04:41 Resolved address 'localhost' to 127.0.0.1
2021/05/04 08:04:41 raw addr: [0 2 3 232 127 0 0 1 0 0 0 0 0 0 0 0]
2021/05/04 08:04:41 failed to dial: invalid argument

Upon debugging I found that SCTP_SOCKOPT_CONNECTX3 flag used here caused the issue. When I replaced the flag with SCTP_SOCKOPT_CONNECTX then it works fine.

I am using go version go1.15.2 linux/s390x to compile/run the example included in the repository.

Just wondering what would cause this issue and whether SCTP_SOCKOPT_CONNECTX can be used exclusively during SCTPConnect function?

Thanks!

@rposts
Copy link
Author

rposts commented Jun 25, 2021

Some more update: I noticed that by only changing optlen to uintptr(unsafe.Pointer(&optlen)) makes it work across most of s390x distros. It certainly looks like getsockopt function is having trouble passing the optlen arguments. Wonder if there are other ways of achieving similar results?

@rposts
Copy link
Author

rposts commented Jun 29, 2022

Closing - N/A.

@rposts rposts closed this as completed Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant