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

Extended passive mode FTP broken on IBM i platform #4037

jonrumsey opened this issue Jun 18, 2019 · 2 comments


Copy link

commented Jun 18, 2019

I did this

Moved from 7.64.1 to 7.65.1 level and built LIBCURL *SRVPGM on IBM i V7R2M0, tested extended passive mode ftp transfer

I expected the following

libcurl to open a new socket to data port on the same ftp server following EPSV 229 response, however this failed with "Cannot resolve new host : 12345". Attached a debugger and found that various string fields on conn structure that were used to derive the host were empty.

The regression appears to have been triggered by a commit in May "libcurl: #ifdef away more code for disabled features/protocols". IBM i platform doesn't use a configure script and so various "HAVE_" defines are not set for the platform.

I can confirm that a local fix of adding HAVE_GETPEERNAME and HAVE_GETSOCKNAME to defines in "packages/OS400/" resolves the problem.

curl/libcurl version


operating system

IBM i V7R2M0

bagder added a commit that referenced this issue Jun 18, 2019

config-os400: it has getpeername and getsockname
Reported-by: jonrumsey on github
Fixes #4037

@bagder bagder added the build label Jun 18, 2019


This comment has been minimized.

Copy link

commented Jun 18, 2019

Thanks, the update to lib/config-os400.h resolves the problem.


This comment has been minimized.

Copy link

commented Jun 18, 2019

Excellent, thanks for confirming!

@bagder bagder closed this in 7fb54ef Jun 18, 2019

monnerat added a commit to monnerat/curl that referenced this issue Aug 11, 2019

os400: getpeername() and getsockname() return ebcdic AF_UNIX sockaddr,
As libcurl now uses these 2 system functions, wrappers are needed on os400
to convert returned AF_UNIX sockaddrs to ascii.

This is a follow-up to commit 7fb54ef.
See also curl#4037.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.