mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-08 07:24:01 +00:00
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>
This commit is contained in:
parent
6b3fd5f3a2
commit
bbbea41d5e
1 changed files with 7 additions and 2 deletions
|
@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
|
||||||
if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
|
if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
/*
|
if (sctp_sk(sk)->subscribe.sctp_data_io_event)
|
||||||
* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
|
pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
|
||||||
|
"Requested SCTP_SNDRCVINFO event.\n"
|
||||||
|
"Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
|
||||||
|
current->comm, task_pid_nr(current));
|
||||||
|
|
||||||
|
/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
|
||||||
* if there is no data to be sent or retransmit, the stack will
|
* if there is no data to be sent or retransmit, the stack will
|
||||||
* immediately send up this notification.
|
* immediately send up this notification.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue