original_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
chunk.c
command.c
debug.c
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
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
ulpqueue.c