hacker / iii

iii - Eye-Fi card manager daemon open source implementation
http://kin.klever.net/iii/
MIT License
36 stars 6 forks source link

problems with gsoap TCP_FASTOPEN #3

Closed ctramnitz closed 3 years ago

ctramnitz commented 7 years ago

It seems recent versions of gsoap have TCP_FASTOPEN enabled by default and leave any error handling with the application. If a kernel doesn't support TCP_FASTOPEN iiid refuses to start:

iiid[32702]: Starting iii eye-fi manager on port 59278
iiid[32702]: Exiting iii daemon, because of error condition
iiid[32702]: Exception: failed to bind()

With strace I can see this:

socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(4, SOL_SOCKET, SO_SNDBUF, [65536], 4) = 0
setsockopt(4, SOL_SOCKET, SO_RCVBUF, [65536], 4) = 0
setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(4, SOL_TCP, TCP_FASTOPEN, [1], 4) = -1 ENOPROTOOPT (Protocol not available)
hacker commented 3 years ago

Uh, I guess you resolved this one eventually? Somehow I either haven't seen it haven't had time to look into it… And it's been four years… exactly four years :)

ctr49 commented 3 years ago

Haha, funny. Didn't pay attention to the date. But actually I was not able to resolve this yet. Still running a version that is built against an older gsoap on an ancient version. No I was looking into this again and finally decided to move this off my NAS (which still has a kernel not supporting TCP_FASTOPEN... after 4 years) to a container running a modern system. Not sure if this is worth fixing anymore.

ctr49 commented 3 years ago

I just gave it a try and actually it looks like this is resolved. An upstream gSOAP change may have fixed this (I also reported the issue to them but can't find it being mentioned in the release notes).

hacker commented 3 years ago

aye, great, I haven't even looked into it deep enough…