[sctp-dev] Problem with SCTP_SET_PEER_PRIMARY_ADDR option
Mehmet Aslan
mehmet.asl at gmail.com
Fri Dec 3 13:33:35 PST 2010
Hi Chris,
Thank you for your kind interest. It would be definitely a pleasure for me
if it was a contribution in any way.
I am looking forward to your update.
By the way, I read your mail in lksctp-developers site. The following
quotation from your mail is really interesting for my purposes:
" ... when I use the IPv4 address it appears to work as expected. ..."
For the moment, being able to set the peer primary address using IPv4
addresses is quite enough for my application. Using the statement in your
mail as a clue, I tried changing my addresses by using Inet4Address class,
but I get the same exception again.
Is there a possibility that you could explain how I can achieve it? Or is
there a work around to set the peer primary address with the same switching
time comparable to using the setOption() method.
Sorry for the inconvenience in your busy time, but it is really important.
Regards,
MehmetAslan
2010/12/3 Chris Hegarty <chris.hegarty at oracle.com>
> 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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20101203/8ee7dcdc/attachment.html
More information about the sctp-dev
mailing list