Skip to content

Commit

Permalink
l2tp: purge session reorder queue on delete
Browse files Browse the repository at this point in the history
Add calls to l2tp_session_queue_purge as a part of l2tp_tunnel_closeall
and l2tp_session_delete.  Pseudowire implementations which are deleted only
via. l2tp_core l2tp_session_delete calls can dispense with their own code for
flushing the reorder queue.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tom Parkin authored and David S. Miller committed Mar 20, 2013
1 parent 48f72f9 commit 4c6e2fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/l2tp/l2tp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,8 @@ void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
synchronize_rcu();
}

l2tp_session_queue_purge(session);

if (session->session_close != NULL)
(*session->session_close)(session);

Expand Down Expand Up @@ -1813,6 +1815,8 @@ EXPORT_SYMBOL_GPL(l2tp_session_free);
*/
int l2tp_session_delete(struct l2tp_session *session)
{
l2tp_session_queue_purge(session);

if (session->session_close != NULL)
(*session->session_close)(session);

Expand Down

0 comments on commit 4c6e2fd

Please sign in to comment.