diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2014-02-06 17:20:08 +0100 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-02-08 09:31:00 +0400 |
commit | 3b5fb8b711bf79c19150d150525a6b8cf9c003c6 (patch) | |
tree | 753c641634489a7a3bd8e0a85de0fe487d970438 /rfc | |
parent | 1744cf7d08f80e6d91423642b8c3b77d73b7321d (diff) | |
download | accel-ppp-3b5fb8b711bf79c19150d150525a6b8cf9c003c6.tar.gz accel-ppp-3b5fb8b711bf79c19150d150525a6b8cf9c003c6.zip |
l2tp: handle tunnel/session dependencies with reference counters
Use reference counters to track tunnels and sessions usage.
Tunnels hold a reference to each of their sessions while sessions hold
a reference to the tunnel they belong to. Tunnels and sessions also
hold themselves to ensure that l2tp_{tunnel_session}_free() will be
called before their reference counter drops to zero.
Once the reference counter drops to zero, the tunnel or session is
destroyed. Destruction may happen in any context, so context dependant
operations still have to be done in l2tp_{tunnel,session}_free(). On
the other hand l2tp_{tunnel,session}_free() must not free data wich may
be required by their reference holders.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'rfc')
0 files changed, 0 insertions, 0 deletions