l2tp: add session reorder queue purge function to core
authorTom Parkin <tparkin@katalix.com>
Tue, 19 Mar 2013 06:11:19 +0000 (06:11 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Feb 2018 18:32:10 +0000 (18:32 +0000)
commit4fa2c620f1a39794da3df4a025b39b18480f64b2
tree485c23113316e7ccbda5770821de3fe5edb54a4a
parent78124e9bcc8c39afbcda2f0500b868dd0b159d40
l2tp: add session reorder queue purge function to core

commit 48f72f92b31431c40279b0fba6c5588e07e67d95 upstream.

If an l2tp session is deleted, it is necessary to delete skbs in-flight
on the session's reorder queue before taking it down.

Rather than having each pseudowire implementation reaching into the
l2tp_session struct to handle this itself, provide a function in l2tp_core to
purge the session 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>
[bwh: Backported to 3.2: use non-atomic increment on rx_errors]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/l2tp/l2tp_core.c
net/l2tp/l2tp_core.h