aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r--net/dccp/output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 4786bdcddcc9..29250749f16f 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -62,10 +62,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
62 62
63 skb->h.raw = skb_push(skb, dccp_header_size); 63 skb->h.raw = skb_push(skb, dccp_header_size);
64 dh = dccp_hdr(skb); 64 dh = dccp_hdr(skb);
65 /* 65
66 * Data packets are not cloned as they are never retransmitted 66 if (!skb->sk)
67 */
68 if (skb_cloned(skb))
69 skb_set_owner_w(skb, sk); 67 skb_set_owner_w(skb, sk);
70 68
71 /* Build DCCP header and checksum it. */ 69 /* Build DCCP header and checksum it. */
@@ -102,6 +100,7 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
102 100
103 DCCP_INC_STATS(DCCP_MIB_OUTSEGS); 101 DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
104 102
103 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
105 err = ip_queue_xmit(skb, 0); 104 err = ip_queue_xmit(skb, 0);
106 if (err <= 0) 105 if (err <= 0)
107 return err; 106 return err;
@@ -243,7 +242,8 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo)
243 242
244 err = dccp_transmit_skb(sk, skb); 243 err = dccp_transmit_skb(sk, skb);
245 ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len); 244 ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len);
246 } 245 } else
246 kfree_skb(skb);
247 247
248 return err; 248 return err;
249} 249}