]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: prevent too-fast association id reuse
authorVlad Yasevich <vladislav.yasevich@hp.com>
Mon, 23 Nov 2009 20:54:01 +0000 (15:54 -0500)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Mon, 23 Nov 2009 20:54:01 +0000 (15:54 -0500)
commitcb95ebd82ec5c0bd8ae6044b11e54a8d9afe7912
tree41975c6b2eea1812012802bdb2337c43fa240178
parentc285f71e79e8a4feee59fb1226777adee3cf293e
sctp: prevent too-fast association id reuse

We use the idr subsystem and always ask for an id
at or above 1.  This results in a id reuse when one
association is terminated while another is created.

To prevent re-use, we keep track of the last id returned
and ask for that id + 1 as a base for each query.  We let
the idr spin lock protect this base id as well.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/associola.c