History

netfilter: conntrack: unify established states for SCTP paths

An SCTP endpoint can start an association through a path and tear it down over another one. That means the initial path will not see the shutdown sequence, and the conntrack entry will remain in ESTABLISHED state for 5 days. By merging the HEARTBEAT_ACKED and ESTABLISHED states into one ESTABLISHED state, there remains no difference between a primary or secondary path. The timeout for the merged ESTABLISHED state is set to 210 seconds (hb_interval * max_path_retrans + rto_max). So, even if a path doesn't see the shutdown sequence, it will expire in a reasonable amount of time. With this change in place, there is now more than one state from which we can transition to ESTABLISHED, COOKIE_ECHOED and HEARTBEAT_SENT, so handle the setting of ASSURED bit whenever a state change has happened and the new state is ESTABLISHED. Removed the check for dir==REPLY since the transition to ESTABLISHED can happen only in the reply direction.

Sriram Yagnaraman committed 3 years ago

Commit a44b7651 parent 13bd9b35 files · +44 −71Browse files

Showing the changes to include/uapi/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/netfilter/nf_conntrack_sctp.h +1 −1
  2. include/uapi/linux/netfilter/nfnetlink_cttimeout.h +1 −1
include/uapi/linux/netfilter/nf_conntrack_sctp.h+1−1
@@ -15,7 +15,7 @@ enum sctp_conntrack { · 14 unmodified lines
15 SCTP_CONNTRACK_SHUTDOWN_RECD,15 SCTP_CONNTRACK_SHUTDOWN_RECD,
16 SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,16 SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
17 SCTP_CONNTRACK_HEARTBEAT_SENT,17 SCTP_CONNTRACK_HEARTBEAT_SENT,
18 SCTP_CONNTRACK_HEARTBEAT_ACKED,18 SCTP_CONNTRACK_HEARTBEAT_ACKED, /* no longer used */
19 SCTP_CONNTRACK_MAX19 SCTP_CONNTRACK_MAX
20};20};
21 21
include/uapi/linux/netfilter/nfnetlink_cttimeout.h+1−1
@@ -94,7 +94,7 @@ enum ctattr_timeout_sctp { · 93 unmodified lines
94 CTA_TIMEOUT_SCTP_SHUTDOWN_RECD,94 CTA_TIMEOUT_SCTP_SHUTDOWN_RECD,
95 CTA_TIMEOUT_SCTP_SHUTDOWN_ACK_SENT,95 CTA_TIMEOUT_SCTP_SHUTDOWN_ACK_SENT,
96 CTA_TIMEOUT_SCTP_HEARTBEAT_SENT,96 CTA_TIMEOUT_SCTP_HEARTBEAT_SENT,
97 CTA_TIMEOUT_SCTP_HEARTBEAT_ACKED,97 CTA_TIMEOUT_SCTP_HEARTBEAT_ACKED, /* no longer used */
98 __CTA_TIMEOUT_SCTP_MAX98 __CTA_TIMEOUT_SCTP_MAX
99};99};
100#define CTA_TIMEOUT_SCTP_MAX (__CTA_TIMEOUT_SCTP_MAX - 1)100#define CTA_TIMEOUT_SCTP_MAX (__CTA_TIMEOUT_SCTP_MAX - 1)