]> asedeno.scripts.mit.edu Git - linux.git/commit
netfilter: conntrack: sctp: use distinct states for new SCTP connections
authorJiri Wiesner <jwiesner@suse.com>
Sat, 18 Jan 2020 12:10:50 +0000 (13:10 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Jan 2020 17:26:53 +0000 (18:26 +0100)
commitab658b9fa7a2c467f79eac8b53ea308b8f98113d
tree9ad9dded87ab4c82b8696de01bde8ee887bf2f46
parent32c72165dbd0e246e69d16a3ad348a4851afd415
netfilter: conntrack: sctp: use distinct states for new SCTP connections

The netlink notifications triggered by the INIT and INIT_ACK chunks
for a tracked SCTP association do not include protocol information
for the corresponding connection - SCTP state and verification tags
for the original and reply direction are missing. Since the connection
tracking implementation allows user space programs to receive
notifications about a connection and then create a new connection
based on the values received in a notification, it makes sense that
INIT and INIT_ACK notifications should contain the SCTP state
and verification tags available at the time when a notification
is sent. The missing verification tags cause a newly created
netfilter connection to fail to verify the tags of SCTP packets
when this connection has been created from the values previously
received in an INIT or INIT_ACK notification.

A PROTOINFO event is cached in sctp_packet() when the state
of a connection changes. The CLOSED and COOKIE_WAIT state will
be used for connections that have seen an INIT and INIT_ACK chunk,
respectively. The distinct states will cause a connection state
change in sctp_packet().

Signed-off-by: Jiri Wiesner <jwiesner@suse.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_proto_sctp.c