aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorTom Parkin <tparkin@katalix.com>2013-03-19 02:11:20 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-20 12:10:39 -0400
commit4c6e2fd35460208596fa099ee0750a4b0438aa5c (patch)
tree3f4db5d8c9433cdb38f744cfd3e63ed1956f6f2b /net/l2tp
parent48f72f92b31431c40279b0fba6c5588e07e67d95 (diff)
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: Tom Parkin <tparkin@katalix.com> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 69c316dd02dc..c00f31b8cc04 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1373,6 +1373,8 @@ again:
1373 synchronize_rcu(); 1373 synchronize_rcu();
1374 } 1374 }
1375 1375
1376 l2tp_session_queue_purge(session);
1377
1376 if (session->session_close != NULL) 1378 if (session->session_close != NULL)
1377 (*session->session_close)(session); 1379 (*session->session_close)(session);
1378 1380
@@ -1813,6 +1815,8 @@ EXPORT_SYMBOL_GPL(l2tp_session_free);
1813 */ 1815 */
1814int l2tp_session_delete(struct l2tp_session *session) 1816int l2tp_session_delete(struct l2tp_session *session)
1815{ 1817{
1818 l2tp_session_queue_purge(session);
1819
1816 if (session->session_close != NULL) 1820 if (session->session_close != NULL)
1817 (*session->session_close)(session); 1821 (*session->session_close)(session);
1818 1822