Bug #5786
closedno error message if keepalive options not supported
100%
Description
the code in libosmo-abis/src/input/ipaccess.c:update_fd_settings()
will simply not set any of the timeout parameters if it would be compiled on a system where TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT or TCP_USER_TIMEOUT are not defined at compile time.
I think it should print a LOGL_ERROR message in the case that the respective timeouts are set (> 0) but the socket option is not available.
What we want to prevent is the user configuring timeouts, assuming they would be installed into the kernel TCP stack, which then simply end up no-ops becaus somehow the libc didn't define them or the right #include file was not present at compile time.
Alternatively, we might simply require those #defines and fail compilations on systems that don't have them. Apparently TCP_KEEP{IDLE,INTVL,CNT} were introduced with kernel 2.4 and TCP_USER_TIMEOUT with 2.6.37. I think it's fair to say that using a modern/master libosmo-* on such old systems might fail for various other reasons (eventfd, ...) and cannot be considered a valid configuration anyway.
Related issues