Welcome to the Linux Foundation Forum!

How to use SO_REUSEADDR in 2.6.32 kernel to avoid 'Address already in use' error with SCTP

I bumped into the error while a java process generates traffic at port 3868 via SCTP.The port is already occupied by a process running on TCP protocol but I need to reuse the same port number 3868 anyhow with the same kernel version 2.6.32. I found using SO_REUSEADDR as a solution to be used but I am unfamiliar to socket programming and how to hack the kernel to get this done . Could someone please assist.
Meanwhile I also had a look at lksctp-tools-1.1.10 specfiles and kernel patches but I could not find out a solution.Besides in Redhat 7 versions the solution is to upgrade to the kernel version 3.10.0-514-6.1.el7 but I can not adapt this method due to version mismatch.

Error:
SCTP application says "Address already in use" or EADDRINUSE

An SCTP client connects to a server. The SCTP handshake of INIT, INIT_ACK, COOKIE_ECHO,COOKIE_ACK, DATA, ACK works fine. The server sends SHUTDOWN and the client cannot connect to the server again.

Work history:
I searched a lot on this and found something like this for TCP but not SCTP:
/proc/sys/net/ipv4/tcp_tw_recycle
/proc/sys/net/ipv4/tcp_tw_reuse
Is there any such hack for SCTP as well in kernel?

Is there a way to backport 3.10.0-514.6.1.el7 to 2.6.32-696.16.1.el6 for only certain patches that had SCTP enables for SO_REUSEADDR?
Is it not possible to port the patch from the later kernel versions to the previous version .... if the answer is NO/YES then what are the reasons/challenges?

Answers

Categories

Upcoming Training