sctp: define subscribe in sctp_sock as __u16

The member subscribe in sctp_sock is used to indicate to which of
the events it is subscribed, more like a group of flags. So it's
better to be defined as __u16 (2 bytpes), instead of struct
sctp_event_subscribe (13 bytes).

Note that sctp_event_subscribe is an UAPI struct, used on sockopt
calls, and thus it will not be removed. This patch only changes
the internal storage of the flags.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Xin Long
2018-11-18 16:08:51 +08:00
committed by David S. Miller
parent f2be6d710d
commit 2cc0eeb676
7 changed files with 69 additions and 38 deletions

View File

@@ -217,7 +217,7 @@ struct sctp_sock {
* These two structures must be grouped together for the usercopy
* whitelist region.
*/
struct sctp_event_subscribe subscribe;
__u16 subscribe;
struct sctp_initmsg initmsg;
int user_frag;