WSL2-Linux-Kernel/net/sctp
Thomas Graf acdd598536 sctp: Allow struct sctp_event_subscribe to grow without breaking binaries
getsockopt(..., SCTP_EVENTS, ...) performs a length check and returns
an error if the user provides less bytes than the size of struct
sctp_event_subscribe.

Struct sctp_event_subscribe needs to be extended by an u8 for every
new event or notification type that is added.

This obviously makes getsockopt fail for binaries that are compiled
against an older versions of <net/sctp/user.h> which do not contain
all event types.

This patch changes getsockopt behaviour to no longer return an error
if not enough bytes are being provided by the user. Instead, it
returns as much of sctp_event_subscribe as fits into the provided buffer.

This leads to the new behavior that users see what they have been aware
of at compile time.

The setsockopt(..., SCTP_EVENTS, ...) API is already behaving like this.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-04 18:05:02 -04:00
..
Kconfig
Makefile
associola.c sctp: fix incorrect overflow check on autoclose 2011-12-19 16:25:46 -05:00
auth.c sctp: better integer overflow check in sctp_auth_create_key() 2011-11-29 15:51:03 -05:00
bind_addr.c net: Remove casts of void * 2011-06-16 23:19:27 -04:00
chunk.c
command.c
debug.c sctp: remove completely unsed EMPTY state 2011-04-20 01:51:03 -07:00
endpointola.c treewide: Fix typos in various parts of the kernel, and fix some comments. 2011-12-02 14:57:31 +01:00
input.c net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
inqueue.c
ipv6.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
objcnt.c
output.c sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd 2011-12-20 13:58:37 -05:00
outqueue.c sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd 2011-12-20 13:58:37 -05:00
primitive.c
probe.c
proc.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
protocol.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
sm_make_chunk.c sctp: fasthandoff with ASCONF at mobile-node 2011-11-08 15:11:29 -05:00
sm_sideeffect.c sctp: fasthandoff with ASCONF at server-node 2011-11-08 15:11:30 -05:00
sm_statefuns.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
sm_statetable.c sctp: Enforce retransmission limit during shutdown 2011-07-07 14:08:44 -07:00
socket.c sctp: Allow struct sctp_event_subscribe to grow without breaking binaries 2012-04-04 18:05:02 -04:00
ssnmap.c
sysctl.c sctp: fix incorrect overflow check on autoclose 2011-12-19 16:25:46 -05:00
transport.c sctp: fasthandoff with ASCONF at mobile-node 2011-11-08 15:11:29 -05:00
tsnmap.c
ulpevent.c sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket 2011-07-08 09:53:08 -07:00
ulpqueue.c