Commit 925b9374 authored by David Miller's avatar David Miller Committed by David S. Miller

sctp: Always pass skbs on a list to sctp_ulpq_tail_event().

This way we can simplify the logic and remove assumptions
about the implementation of skb lists.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0eff1052
...@@ -738,19 +738,19 @@ void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *ulpq, __u32 fwd_tsn) ...@@ -738,19 +738,19 @@ void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *ulpq, __u32 fwd_tsn)
static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq) static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq)
{ {
struct sctp_ulpevent *event = NULL; struct sctp_ulpevent *event = NULL;
struct sk_buff_head temp;
if (skb_queue_empty(&ulpq->reasm)) if (skb_queue_empty(&ulpq->reasm))
return; return;
while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) { while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) {
/* Do ordering if needed. */ struct sk_buff_head temp;
if (event->msg_flags & MSG_EOR) {
skb_queue_head_init(&temp); skb_queue_head_init(&temp);
__skb_queue_tail(&temp, sctp_event2skb(event)); __skb_queue_tail(&temp, sctp_event2skb(event));
/* Do ordering if needed. */
if (event->msg_flags & MSG_EOR)
event = sctp_ulpq_order(ulpq, event); event = sctp_ulpq_order(ulpq, event);
}
/* Send event to the ULP. 'event' is the /* Send event to the ULP. 'event' is the
* sctp_ulpevent for very first SKB on the temp' list. * sctp_ulpevent for very first SKB on the temp' list.
...@@ -1082,6 +1082,10 @@ void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq, ...@@ -1082,6 +1082,10 @@ void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq,
event = sctp_ulpq_retrieve_first(ulpq); event = sctp_ulpq_retrieve_first(ulpq);
/* Send event to the ULP. */ /* Send event to the ULP. */
if (event) { if (event) {
struct sk_buff_head temp;
skb_queue_head_init(&temp);
__skb_queue_tail(&temp, sctp_event2skb(event));
sctp_ulpq_tail_event(ulpq, event); sctp_ulpq_tail_event(ulpq, event);
sctp_ulpq_set_pd(ulpq); sctp_ulpq_set_pd(ulpq);
return; return;
......
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