diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-07-12 14:30:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-16 17:40:04 -0400 |
commit | bbbea41d5e53335fd81e89c728f71b14386f336e (patch) | |
tree | d8db0a4ffa2ba2d32807597e9b30865e1cced7e8 /net/sctp | |
parent | 6b3fd5f3a2bbc8464a8e0bf134a183b8fa026439 (diff) |
net: sctp: deprecate rfc6458, 5.3.2. SCTP_SNDRCV support
With support of SCTP_SNDINFO/SCTP_RCVINFO as described in RFC6458,
5.3.4/5.3.5, we can now deprecate SCTP_SNDRCV. The RFC already
declares it as deprecated:
This structure mixes the send and receive path. SCTP_SNDINFO
(described in Section 5.3.4) and SCTP_RCVINFO (described in
Section 5.3.5) split this information. These structures should
be used, when possible, since SCTP_SNDRCV is deprecated.
So whenever a user tries to subscribe to sctp_data_io_event via
setsockopt(2) which triggers inclusion of SCTP_SNDRCV cmsg_type,
issue a warning in the log.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index d95a50c013c9..743308f40544 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval, | |||
2205 | if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) | 2205 | if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) |
2206 | return -EFAULT; | 2206 | return -EFAULT; |
2207 | 2207 | ||
2208 | /* | 2208 | if (sctp_sk(sk)->subscribe.sctp_data_io_event) |
2209 | * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT, | 2209 | pr_warn_ratelimited(DEPRECATED "%s (pid %d) " |
2210 | "Requested SCTP_SNDRCVINFO event.\n" | ||
2211 | "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n", | ||
2212 | current->comm, task_pid_nr(current)); | ||
2213 | |||
2214 | /* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT, | ||
2210 | * if there is no data to be sent or retransmit, the stack will | 2215 | * if there is no data to be sent or retransmit, the stack will |
2211 | * immediately send up this notification. | 2216 | * immediately send up this notification. |
2212 | */ | 2217 | */ |