socket (PF_INET, SOCK_STREAM, 4) == EPROTONOSUPPORT

Within openSUSE 11.2 I get this error while trying to open a socket with protocol 4 (IP). Errno 93, Protocol not supported.

The same code works on RedHat. Anyone have an idea what could be causing this?

Ha! Found the problem… Its actually a bad implementation, an INET4 socket with STREAM type can only be opened with protocol 0 or TCP. Using IP here is wrong and the failure is correct…

ip(7): IPv4 protocol implementation - Linux man page

This means openSUSE is actually more accurate with socket handling than RHEL.

Quite likely it was a error in the kernel being too lenient in the past but now the error check has been tightened up in recent kernels.