There is a post with the same problem and there is no solution yet. https://stackoverflow.com/questions/78158391/duplicated-packets-received-in-unix-network-programming-about-sctp Maybe is it a new bug? On Wed, 5 Jun 2024 at 08:02, Igor Spiridonov <igor.sp.ser@xxxxxxxxx> wrote: > > Hi, > I have a sctp client and an echo server that use one to many mode. > The client sends some amount of messages with different stream ids. > After that it reads them back from the server with sctp_recvmsg. > The server reads one message at a time and sends it back with the same > stream id. > When I test this on a local host then everything works perfectly - all > messages are sent, read and the assoc id is the same every time. > > If I have the client and the server on different hosts then there are > the following problems. > sctp_recvmsg sometimes returns the same message twice - these messages > have the same assoc id, stream i, ssn. Looks like it can happen only > with the first received message. MSG_EOR is true every time. > Tcpdump doesn't show any duplicates. > The second problem is that assoc id changes very often if i send > messages with just a couple seconds delay. I think the same hosts > should have the same assoc id more or less. > Both hosts have linux kernel 6.5.0-35. > > Igor.