summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2014-02-06 17:20:08 +0100
committerDmitry Kozlov <xeb@mail.ru>2014-02-08 09:31:00 +0400
commit3b5fb8b711bf79c19150d150525a6b8cf9c003c6 (patch)
tree753c641634489a7a3bd8e0a85de0fe487d970438 /accel-pppd/ctrl/pppoe
parent1744cf7d08f80e6d91423642b8c3b77d73b7321d (diff)
downloadaccel-ppp-xebd-3b5fb8b711bf79c19150d150525a6b8cf9c003c6.tar.gz
accel-ppp-xebd-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 'accel-pppd/ctrl/pppoe')
0 files changed, 0 insertions, 0 deletions