[sctp-dev] Problem with SCTP_SET_PEER_PRIMARY_ADDR option

Chris Hegarty chris.hegarty at oracle.com
Fri Dec 3 05:51:25 PST 2010


Hi Mehmet,

There is certainly a bug in the Java implementation where we set 
SCTP_SET_PEER_PRIMARY_ADDR, but it is not clear to me that the native 
lksctp stack is behaving as expected. I've sent a mail to the 
lksctp-developers mailing list to request clarification on the expected 
behavior of the native call. Once I have clarification I will make the 
appropriate changes in the JDK.

I filed a bug, CR 7004439 "(sctp) SCTP_SET_PEER_PRIMARY_ADDR throws 
SocketException on Linux", against this problem for the JDK.

Thanks for finding and reporting this issue. I will update this thread 
(hopefully within the next few days) with more information as it becomes 
available.

Thanks,
-Chris.

On 02/12/2010 07:57, Mehmet Aslan wrote:
> Hi All,
> Actually I asked the following question in a reply message to the prior
> thread. Maybe because this, it did not draw any attention. The problem
> still exists and I can not go forward and I am not sure if it is a
> setting issue on SCTP side or if it is a problem in my setup. I will try
> my chance in a new thread hoping that I can get some useful response, as
> it happened in the previous thread.
> Currently,
>
> net.sctp.addip_noauth_enable = 1
> net.sctp.addip_enable = 1
>
> Now, I can bind new addresses to a connected association or unbind any
> of local addresses from it. However I can not set peer primary address
> using related setOption() method.
> The simple scenario and the case;
> Server                                         Client
> 192.168.1.25 :3456                      192.168.1.25   :6060
>                                                    192.168.1.133 :6060
>
> I would like to change peer primary address from ... .25:6060 to ...
> .133:6060 instructing from the client side (using
> setOption(SCTP_SET_PEER_PRIMARY_ADDR, sockAddr). When I applied the
> instruction, I get a java.net <http://java.net/> exception. Here are the
> related code parts:
>
> Server:
> ...
> ssc.getOption(SCTP_PRIMARY_ADDR); // This gives out ... .25 :6060  as
> the primary addr
>
> Client:
> ...
> // I want the server to use the other address (... .133 :6060) as the
> primary address
> // and I want to make this change by means of an instruction from client
> side. I use the code below;
> sockAddr = new InetSocketAddress("192.168.1.133", 6060);
> sc.setOption(SCTP_SET_PEER_PRIMARY_ADDR, sockAddr);
> ....
>
> In the output window of client, at the line of setOption() method I get
> the following exception and no change in the primary address:
> "java.net.SocketException: Cannot assign requested address"
>
> I will appreciate much if an explanation is posted about how I can solve
> this issue.
> Additionally, is the following setting enough to enable Dynamic Address
> Reconfiguration extension completely?
>
> net.sctp.addip_noauth_enable = 1
> net.sctp.addip_enable = 1
>
> Thanks in advance,
> regards,
> MehmetAslan


More information about the sctp-dev mailing list