All of lore.kernel.org
 help / color / mirror / Atom feed
* ip_conntrack_proto_sctp INIT_ACK messages dropped
@ 2005-02-08 12:37 Ariel Rosenblatt
  2005-02-14 23:20 ` ip_conntrack_proto_sctp INIT_ACK messages droppedg Harald Welte
  0 siblings, 1 reply; 12+ messages in thread
From: Ariel Rosenblatt @ 2005-02-08 12:37 UTC (permalink / raw)
  To: netfilter-devel

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 trying to re-establish the
association. However, the INIT_ACK message will be dropped, preventing the
association from becoming established.

The following patch seems to solve 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;
---

^ permalink raw reply	[flat|nested] 12+ messages in thread
* ip_conntrack_proto_sctp INIT_ACK messages dropped
@ 2005-02-07 19:37 Ariel Rosenblatt
  0 siblings, 0 replies; 12+ messages in thread
From: Ariel Rosenblatt @ 2005-02-07 19:37 UTC (permalink / raw)
  To: netfilter-devel

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;
---

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-02-23 15:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-08 12:37 ip_conntrack_proto_sctp INIT_ACK messages dropped Ariel Rosenblatt
2005-02-14 23:20 ` ip_conntrack_proto_sctp INIT_ACK messages droppedg Harald Welte
2005-02-15 16:08   ` Patrick McHardy
2005-02-15 16:45     ` ip_conntrack_proto_sctp INIT_ACK messages dropped Ariel Rosenblatt
2005-02-18  0:50       ` Patrick McHardy
2005-02-21 18:33         ` Ariel Rosenblatt
2005-02-22 14:05           ` Patrick McHardy
2005-02-22 16:34             ` Ariel Rosenblatt
2005-02-22 18:44               ` Patrick McHardy
2005-02-22 18:58                 ` Ariel Rosenblatt
2005-02-23 15:53                   ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2005-02-07 19:37 Ariel Rosenblatt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.