Commit 4c6e2fd3 authored by Tom Parkin's avatar Tom Parkin Committed by David S. Miller

l2tp: purge session reorder queue on delete

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: default avatarTom Parkin <tparkin@katalix.com>
Signed-off-by: default avatarJames Chapman <jchapman@katalix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 48f72f92
...@@ -1373,6 +1373,8 @@ void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) ...@@ -1373,6 +1373,8 @@ void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
synchronize_rcu(); synchronize_rcu();
} }
l2tp_session_queue_purge(session);
if (session->session_close != NULL) if (session->session_close != NULL)
(*session->session_close)(session); (*session->session_close)(session);
...@@ -1813,6 +1815,8 @@ EXPORT_SYMBOL_GPL(l2tp_session_free); ...@@ -1813,6 +1815,8 @@ EXPORT_SYMBOL_GPL(l2tp_session_free);
*/ */
int l2tp_session_delete(struct l2tp_session *session) int l2tp_session_delete(struct l2tp_session *session)
{ {
l2tp_session_queue_purge(session);
if (session->session_close != NULL) if (session->session_close != NULL)
(*session->session_close)(session); (*session->session_close)(session);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment