diff options
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index b1eaf7bcfb11..2532797a8009 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -241,7 +241,7 @@ static void dccp_xmit_packet(struct sock *sk) | |||
241 | { | 241 | { |
242 | int err, len; | 242 | int err, len; |
243 | struct dccp_sock *dp = dccp_sk(sk); | 243 | struct dccp_sock *dp = dccp_sk(sk); |
244 | struct sk_buff *skb = skb_dequeue(&sk->sk_write_queue); | 244 | struct sk_buff *skb = dccp_qpolicy_pop(sk); |
245 | 245 | ||
246 | if (unlikely(skb == NULL)) | 246 | if (unlikely(skb == NULL)) |
247 | return; | 247 | return; |
@@ -344,7 +344,7 @@ void dccp_write_xmit(struct sock *sk) | |||
344 | struct dccp_sock *dp = dccp_sk(sk); | 344 | struct dccp_sock *dp = dccp_sk(sk); |
345 | struct sk_buff *skb; | 345 | struct sk_buff *skb; |
346 | 346 | ||
347 | while ((skb = skb_peek(&sk->sk_write_queue))) { | 347 | while ((skb = dccp_qpolicy_top(sk))) { |
348 | int rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb); | 348 | int rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb); |
349 | 349 | ||
350 | switch (ccid_packet_dequeue_eval(rc)) { | 350 | switch (ccid_packet_dequeue_eval(rc)) { |
@@ -358,8 +358,7 @@ void dccp_write_xmit(struct sock *sk) | |||
358 | dccp_xmit_packet(sk); | 358 | dccp_xmit_packet(sk); |
359 | break; | 359 | break; |
360 | case CCID_PACKET_ERR: | 360 | case CCID_PACKET_ERR: |
361 | skb_dequeue(&sk->sk_write_queue); | 361 | dccp_qpolicy_drop(sk, skb); |
362 | kfree_skb(skb); | ||
363 | dccp_pr_debug("packet discarded due to err=%d\n", rc); | 362 | dccp_pr_debug("packet discarded due to err=%d\n", rc); |
364 | } | 363 | } |
365 | } | 364 | } |