[erlang-bugs] gen_sctp:open fails on linux

jrsantos <>
Tue Apr 3 20:51:22 CEST 2007


I was testing out the SCTP support included in Erlang/OTP R11B-4 on a
linux 2.6.8 system.  Calls to gen_sctp:open were failing.  I narrowed
the problem down to an einval being returned while trying to set the
sndbuf socket option.

Looking at erts/emulator/drivers/common/inet_drv.c, it looks like it is
calling setsockopt(IPPROTO_SCTP, SO_SNDBUF, ...), which fails.  I
believe that this should be calling setsockopt(SOL_SOCKET, SO_SNDBUF,
...) instead.  Also, I think the same thing holds for SO_RCVBUF.

I made these changes in inet_drv.c, and the gen_sctp:open call succeeds
and I am able to use the SCTP socket.

        -Jon



More information about the erlang-bugs mailing list