[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 04 Apr 2012 18:05:52 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: vladislav.yasevich@...com
Cc: linux-sctp@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] scpt: Allow struct sctp_event_subscribe to grow
without breaking binaries
From: Vladislav Yasevich <vladislav.yasevich@...com>
Date: Wed, 04 Apr 2012 09:52:04 -0400
> On 04/04/2012 04:17 AM, Thomas Graf wrote:
>> 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@...g.ch>
>
> Acked-by: Vlad Yasevich <vladislav.yasevich@...com>
Applied, but I had to fix the Subject to read "sctp: " not "scpt: " :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists