ip_conntrack_proto_sctp INIT_ACK messages dropped
Hello,
I have run into a problem using the sctp conntrack module.
When an association is terminated without a proper SHUTDOWN it is not possible to re-establish the same association. The SCTP endpoint will send an INIT message in the original direction to trying to re-establish the association. However, the INIT_ACK message will be dropped, preventing the association from becoming established.
The following patch solves the problem, the INIT "init_tag" is now saved properly for an ESTABLISHED sctp association. The "init_tag" (of an INIT message) wasn't being saved in the proper direction, causing the INIT_ACK to be dropped while verifying the tag ("vtag") at the beginning of sctp_packet().
I believe this should be the behavior as per RFC 2960, Section 5.2.2.
Cheers,
- Ariel
--- /usr/src/linux-2.6.10/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
2005-02-04 16:22:24.000000000 -0500
+++ ip_conntrack_proto_sctp.c 2005-02-07 13:59:19.049791784 -0500
@@ -401,7 +401,11 @@
}
DEBUGP("Setting vtag %x for dir %d\n",
ih->init_tag, CTINFO2DIR(ctinfo));- conntrack->proto.sctp.vtag[IP_CT_DIR_ORIGINAL] =ih->init_tag;
+ if (sch->type == SCTP_CID_INIT_ACK) {
+
conntrack->proto.sctp.vtag[IP_CT_DIR_ORIGINAL] = ih->init_tag;
+ } else {
+ conntrack->proto.sctp.vtag[IP_CT_DIR_REPLY]
= ih->init_tag;
+ }
}
conntrack->proto.sctp.state = newconntrack;---