sctp and select
Quoted 9 lines · muskala magda
hi,
i am trying to rn this server. the (low level) communication seems to be done. but after accepting the connection, the select doesn't notice an incoming data. it notices only the 4 way handshake & closing packets, but not the data. the program waits in this line:
Quoted 8 lines
if (
select(fdmax+1, &read_fds, NULL, NULL, NULL)) {there is also an error after cookie echo received by the server, but as already mentioned, the communication seems not to be broken. are the data buffered? how can i check it/read it? how can i (if it is possible at all) "force" the select to notice the incoming data packets?
It looks like the system you are talking to is utterly broken.
Quoted 16 lines
No. Time Source Destination
Protocol Info
484981 192374.502964 192.168.1.233
192.168.1.109 SCTP DATAFrame 484981 (72 bytes on wire, 72 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.233 (192.168.1.233),
Dst: 192.168.1.109 (192.168.1.109)
Stream Control Transmission Protocol, Src Port: 3072 (3072), Dst Port: 10000 (10000)Source port: 3072 Destination port: 10000 Verification tag: 0x4d855e4f Checksum: 0x5edddafd [correct CRC32C] DATA chunk(ordered, complete segment, TSN:
Quoted 8 lines
3998009280, SID: 0, SSN: 1, PPID: 0, payload length: 8 bytes)
Chunk type: DATA (0)
Chunk flags:0x03
Chunk length: 24
TSN: 3998009280
Stream Identifier:0x0000
Stream sequence number: 1
First of all, the very first data chunk of an association has to start with a SSN of 0.
Quoted 87 lines
Payload protocol identifier: not specified (0)
Data (8 bytes)0000 72 63 23 23 23 32 36 39
rc###269Data: 7263232323323639No. Time Source Destination
Protocol Info
484999 192380.098573 192.168.1.233
192.168.1.109 SCTP DATAFrame 484999 (320 bytes on wire, 320 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.233 (192.168.1.233),
Dst: 192.168.1.109 (192.168.1.109)
Stream Control Transmission Protocol, Src Port: 3072 (3072), Dst Port: 10000 (10000)Source port: 3072 Destination port: 10000 Verification tag: 0x4d855e4f Checksum: 0x9b833a01 [correct CRC32C] DATA chunk(ordered, complete segment, TSN:3998009281, SID: 0, SSN: 1, PPID: 0, payload length:
256 bytes)
Chunk type: DATA (0)
Chunk flags:0x03
Chunk length: 272
TSN: 3998009281
Stream Identifier:0x0000
Stream sequence number: 1
Payload protocol identifier: not specified (0)
Data (256 bytes)0000 68 6f 73 74 6e 61 6d 65 20 45 44 4f 53 4b 32 36
hostname EDOSK26
0010 37 34 0a 2f 62 69 6e 2f 65 78 70 61 6e 64 20 2f
74./bin/expand /
0020 65 74 63 2f 72 61 6d 66 73 2e 69 6d 67 20 2f 64
etc/ramfs.img /d
0030 65 76 2f 72 61 6d 30 0a 2f 62 69 6e 2f 65 78 70
ev/ram0./bin/exp
0040 61 6e 64 20 2f 65 74 63 2f 72 61 6d 66 73 2e 69
and/etc/ramfs.i
0050 6d 67 20 2f 64 65 76 2f 72 61 6d 31 0a 6d 6f 75
mg/dev/ram1.mou
0060 6e 74 20 2d 74 20 70 72 6f 63 20 70 72 6f 63 20
nt -t proc proc
0070 2f 70 72 6f 63 0a 6d 6f 75 6e 74 20 2d 74 20 65
/proc.mount -t e
0080 78 74 32 20 2f 64 65 76 2f 72 61 6d 30 20 2f 76
xt2/dev/ram0/v
0090 61 72 0a 6d 6f 75 6e 74 20 2d 74 20 65 78 74 32
ar.mount -t ext2
00a0 20 2f 64 65 76 2f 72 61 6d 31 20 2f 65 74 63 2f
/dev/ram1/etc/
00b0 63 6f 6e 66 69 67 0a 6d 6b 64 69 72 20 2f 76 61
config.mkdir /va
00c0 72 2f 74 6d 70 0a 6d 6b 64 69 72 20 2f 76 61 72
r/tmp.mkdir /var
00d0 2f 6c 6f 67 0a 6d 6b 64 69 72 20 2f 76 61 72 2f
/log.mkdir/var/
00e0 72 75 6e 0a 6d 6b 64 69 72 20 2f 76 61 72 2f 6c
run.mkdir/var/l
00f0 6f 63 6b 0a 66 6c 61 74 66 73 64 20 2d 72 0a 63
ock.flatfsd-r.c
Data:
686F73746E616D652045444F534B323637340A2F62696E2F...No. Time Source Destination
Protocol Info
485007 192385.449421 192.168.1.233
192.168.1.109 SCTP DATAFrame 485007 (80 bytes on wire, 80 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.233 (192.168.1.233),
Dst: 192.168.1.109 (192.168.1.109)
Stream Control Transmission Protocol, Src Port: 3072 (3072), Dst Port: 10000 (10000)Source port: 3072 Destination port: 10000 Verification tag: 0x4d855e4f Checksum: 0xa6294f39 [correct CRC32C] DATA chunk(ordered, complete segment, TSN:
Quoted 8 lines
3998009282, SID: 0, SSN: 1, PPID: 0, payload length:
13 bytes)
Chunk type: DATA (0)
Chunk flags:0x03
Chunk length: 29
TSN: 3998009282
Stream Identifier:0x0000
Stream sequence number: 1
Secondly, each subsequent complete DATA chunk must increment the Stream sequence number. SSN 1 has already been received above.
The only time that SSN remains the same is when fragment DATA chunks are sent.
Looks like the sender SCTP stack has a bug with ordered DATA chunks.
-vlad
Quoted 122 lines
Payload protocol identifier: not specified (0) Chunk padding: 303030
Data (13 bytes)0000 61 74 20 2f 65 74 63 2f 6d 6f 74 64 0a
at/etc/motd.Data: 6174202F6574632F6D6F74640ANo. Time Source Destination
Protocol Info
485008 192385.647279 192.168.1.109
192.168.1.233 SCTP SACKFrame 485008 (64 bytes on wire, 64 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.109 (192.168.1.109),
Dst: 192.168.1.233 (192.168.1.233)
Stream Control Transmission Protocol, Src Port: 10000 (10000), Dst Port: 3072 (3072)Source port: 10000 Destination port: 3072 Verification tag: 0xee4cc7c0 Checksum: 0xd87dd0d3 [correct CRC32C] SACK chunk (Cumulative TSN: 3998009282, a_rwnd:55019, gaps: 0, duplicate TSNs: 0)
Chunk type: SACK (3)
Chunk flags:0x00
Chunk length: 16
Cumulative TSN ACK: 3998009282 Advertised receiver window credit (a_rwnd):
55019
Number of gap acknowledgement blocks: 0 Number of duplicated TSNs: 0No. Time Source Destination
Protocol Info
485203 192463.052409 192.168.1.233
192.168.1.109 SCTP SHUTDOWNFrame 485203 (62 bytes on wire, 62 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.233 (192.168.1.233),
Dst: 192.168.1.109 (192.168.1.109)
Stream Control Transmission Protocol, Src Port: 3072 (3072), Dst Port: 10000 (10000)Source port: 3072 Destination port: 10000 Verification tag: 0x4d855e4f Checksum: 0xfa0aa00c [correct CRC32C] SHUTDOWN chunk (Cumulative TSN ack: 1795865471) Chunk type: SHUTDOWN (7) Chunk flags: 0x00 Chunk length: 8 Cumulative TSN Ack: 1795865471No. Time Source Destination
Protocol Info
485204 192463.052528 192.168.1.109
192.168.1.233 SCTPSHUTDOWN_ACKFrame 485204 (52 bytes on wire, 52 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.109 (192.168.1.109),
Dst: 192.168.1.233 (192.168.1.233)
Stream Control Transmission Protocol, Src Port: 10000 (10000), Dst Port: 3072 (3072)Source port: 10000 Destination port: 3072 Verification tag: 0xee4cc7c0 Checksum: 0x6df73964 [correct CRC32C] SHUTDOWN_ACK chunk Chunk type: SHUTDOWN_ACK (8) Chunk flags: 0x00 Chunk length: 4No. Time Source Destination
Protocol Info
485205 192463.145419 192.168.1.233
192.168.1.109 SCTPSHUTDOWN_COMPLETEFrame 485205 (62 bytes on wire, 62 bytes captured) Linux cooked capture
Internet Protocol, Src: 192.168.1.233 (192.168.1.233),
Dst: 192.168.1.109 (192.168.1.109)
Stream Control Transmission Protocol, Src Port: 3072 (3072), Dst Port: 10000 (10000)Source port: 3072 Destination port: 10000 Verification tag: 0x4d855e4f Checksum: 0x9b456826 [correct CRC32C] SHUTDOWN_COMPLETE chunk Chunk type: SHUTDOWN_COMPLETE (14) Chunk flags: 0x00 Chunk length: 4--
With your feet on the air and your head on the ground Try this trick and spin it, yeah
Your head will collapse if there's nothing in it And you'll ask yourselfWhere is my mind?
Where is my mind?
Where is my mind?__________________________________________________________Gesendet von Yahoo! Mail.
Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Lksctp-developers mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/lksctp-developers