LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SCTP remove FORWARD_TSN (https://www.linuxquestions.org/questions/linux-networking-3/sctp-remove-forward_tsn-4175476372/)

andrzej_d8 09-08-2013 10:13 AM

SCTP remove FORWARD_TSN
 
I use linux kernel to create SCTP association.
It sends SCTP INIT message which contains "forward TSN supported parameter" but this parameter is not accepted by the server.
Is there any way to send SCTP INIT without this parameter ?

Here is my code :

#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/sctp.h>

int main(int argc, char **argv)
{
struct sockaddr_in saddr;
struct sctp_initmsg initmsg;
int cfd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
memset(&initmsg, 0, sizeof(initmsg));
initmsg.sinit_num_ostreams = 3;
initmsg.sinit_max_instreams = 3;
initmsg.sinit_max_attempts = 2;
setsockopt(cfd, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, sizeof(initmsg));
bzero((void *)&saddr, sizeof(saddr));
saddr.sin_family = AF_INET;
inet_pton(AF_INET, "10.209.1.1", &saddr.sin_addr);
saddr.sin_port = htons(2905);
connect(cfd, (struct sockaddr *)&saddr, sizeof(saddr));
usleep(3000000);
close(cfd);
return 0;
}

This is INIT message :

Stream Control Transmission Protocol, Src Port: 39574 (39574), Dst Port: 2905 (2905)
Source port: 39574
Destination port: 2905
Verification tag: 0x00000000
Checksum: 0x00000000 (not verified)
INIT chunk (Outbound streams: 3, inbound streams: 3)
Chunk type: INIT (1)
Chunk flags: 0x00
Chunk length: 52
Initiate tag: 0xe2c1137e
Advertised receiver window credit (a_rwnd): 114688
Number of outbound streams: 3
Number of inbound streams: 3
Initial TSN: 3111506856
IPv4 address parameter (Address: 10.209.1.1)
IPv4 address parameter (Address: 10.151.1.2)
Supported address types parameter (Supported types: IPv4)
ECN parameter
Forward TSN supported parameter

I tried Ubuntu, Fedora, Opensuse and it's always the same problem.

nini09 09-10-2013 03:45 PM

What do you get when server reject the SCTP parameter, connection fail or something else?

dt64 09-12-2013 04:46 AM

Do you get anything back from the remote system?
At least it should send you a INIT_ACK according to RFC2960 section 3.3.3
What SCTP stack do you use? I might be wrong, but I'm not aware that Linux would support SCTP out of the box. At least none of the systems using SCTP I've seen use Linux inbuilt SCTP.
What is your use case for using SCTP?
What kind of system you want to connect to? I've found that different implementations interpret the RFCs differently and therefore aren't really compatible. Some even just set own "standards" and see the RFCs as what they are - recommendations you may use or you may ignore.
Do you use SCTP as per RFC2960 or 4960? Many people consider 2960 as obsolete, but may others keep ignoring 4960 and only accept 2960.
Looks like you are doing multi-homing as well. Can your system talk to both dest IPs ok?

Please provide few more details and we'll see what we can do.


All times are GMT -5. The time now is 07:07 PM.