Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361796
b: refs/heads/master
c: 48f72f9
h: refs/heads/master
v: v3
  • Loading branch information
Tom Parkin authored and David S. Miller committed Mar 20, 2013
1 parent 7a75cb3 commit 9c5f0ee
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02d13ed5f94af38c37d1abd53462fe48d78bcc9d
refs/heads/master: 48f72f92b31431c40279b0fba6c5588e07e67d95
17 changes: 17 additions & 0 deletions trunk/net/l2tp/l2tp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,23 @@ void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb,
}
EXPORT_SYMBOL(l2tp_recv_common);

/* Drop skbs from the session's reorder_q
*/
int l2tp_session_queue_purge(struct l2tp_session *session)
{
struct sk_buff *skb = NULL;
BUG_ON(!session);
BUG_ON(session->magic != L2TP_SESSION_MAGIC);
while ((skb = skb_dequeue(&session->reorder_q))) {
atomic_long_inc(&session->stats.rx_errors);
kfree_skb(skb);
if (session->deref)
(*session->deref)(session);
}
return 0;
}
EXPORT_SYMBOL_GPL(l2tp_session_queue_purge);

/* Internal UDP receive frame. Do the real work of receiving an L2TP data frame
* here. The skb is not on a list when we get here.
* Returns 0 if the packet was a data packet and was successfully passed on.
Expand Down
1 change: 1 addition & 0 deletions trunk/net/l2tp/l2tp_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ extern struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunne
extern int l2tp_session_delete(struct l2tp_session *session);
extern void l2tp_session_free(struct l2tp_session *session);
extern void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb, unsigned char *ptr, unsigned char *optr, u16 hdrflags, int length, int (*payload_hook)(struct sk_buff *skb));
extern int l2tp_session_queue_purge(struct l2tp_session *session);
extern int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb);

extern int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len);
Expand Down

0 comments on commit 9c5f0ee

Please sign in to comment.