Commit cffc7b38 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6

parents e29971f9 b2cc99f0
...@@ -463,6 +463,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req, ...@@ -463,6 +463,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
if (skb != NULL) { if (skb != NULL) {
const struct inet_request_sock *ireq = inet_rsk(req); const struct inet_request_sock *ireq = inet_rsk(req);
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr,
ireq->rmt_addr, ireq->rmt_addr,
ireq->opt); ireq->opt);
...@@ -647,6 +648,7 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code) ...@@ -647,6 +648,7 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
if (skb != NULL) { if (skb != NULL) {
const struct inet_sock *inet = inet_sk(sk); const struct inet_sock *inet = inet_sk(sk);
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_build_and_send_pkt(skb, sk, err = ip_build_and_send_pkt(skb, sk,
inet->saddr, inet->daddr, NULL); inet->saddr, inet->daddr, NULL);
if (err == NET_XMIT_CN) if (err == NET_XMIT_CN)
......
...@@ -62,10 +62,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) ...@@ -62,10 +62,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
skb->h.raw = skb_push(skb, dccp_header_size); skb->h.raw = skb_push(skb, dccp_header_size);
dh = dccp_hdr(skb); dh = dccp_hdr(skb);
/*
* Data packets are not cloned as they are never retransmitted if (!skb->sk)
*/
if (skb_cloned(skb))
skb_set_owner_w(skb, sk); skb_set_owner_w(skb, sk);
/* Build DCCP header and checksum it. */ /* Build DCCP header and checksum it. */
...@@ -102,6 +100,7 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) ...@@ -102,6 +100,7 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
DCCP_INC_STATS(DCCP_MIB_OUTSEGS); DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_queue_xmit(skb, 0); err = ip_queue_xmit(skb, 0);
if (err <= 0) if (err <= 0)
return err; return err;
...@@ -243,7 +242,8 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo) ...@@ -243,7 +242,8 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo)
err = dccp_transmit_skb(sk, skb); err = dccp_transmit_skb(sk, skb);
ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len); ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len);
} } else
kfree_skb(skb);
return err; return err;
} }
......
...@@ -402,8 +402,6 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -402,8 +402,6 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
* This bug was _quickly_ found & fixed by just looking at an OSTRA * This bug was _quickly_ found & fixed by just looking at an OSTRA
* generated callgraph 8) -acme * generated callgraph 8) -acme
*/ */
if (rc != 0)
goto out_discard;
out_release: out_release:
release_sock(sk); release_sock(sk);
return rc ? : len; return rc ? : len;
......
...@@ -435,17 +435,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss ...@@ -435,17 +435,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
int nsize, old_factor; int nsize, old_factor;
u16 flags; u16 flags;
if (unlikely(len >= skb->len)) { BUG_ON(len > skb->len);
if (net_ratelimit()) {
printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
"end_seq=%u, skb->len=%u.\n", len, mss_now,
TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
skb->len);
WARN_ON(1);
}
return 0;
}
nsize = skb_headlen(skb) - len; nsize = skb_headlen(skb) - len;
if (nsize < 0) if (nsize < 0)
nsize = 0; nsize = 0;
......
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