aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-21 15:22:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-21 15:22:33 -0400
commitcffc7b38a23960d5f83b0aec5e67f189a6ae8062 (patch)
tree2d3d5f6bd4447a482d4fcf51a788e2fc4c34c20d
parente29971f9a4ca08c3c31b98be96c293ef9f7dcc32 (diff)
parentb2cc99f04c5a732c793519aca61a20f719b50db4 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
-rw-r--r--net/dccp/ipv4.c2
-rw-r--r--net/dccp/output.c10
-rw-r--r--net/dccp/proto.c2
-rw-r--r--net/ipv4/tcp_output.c12
4 files changed, 8 insertions, 18 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index ae088d1347af..6298cf58ff9e 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -463,6 +463,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
463 if (skb != NULL) { 463 if (skb != NULL) {
464 const struct inet_request_sock *ireq = inet_rsk(req); 464 const struct inet_request_sock *ireq = inet_rsk(req);
465 465
466 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
466 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, 467 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr,
467 ireq->rmt_addr, 468 ireq->rmt_addr,
468 ireq->opt); 469 ireq->opt);
@@ -647,6 +648,7 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
647 if (skb != NULL) { 648 if (skb != NULL) {
648 const struct inet_sock *inet = inet_sk(sk); 649 const struct inet_sock *inet = inet_sk(sk);
649 650
651 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
650 err = ip_build_and_send_pkt(skb, sk, 652 err = ip_build_and_send_pkt(skb, sk,
651 inet->saddr, inet->daddr, NULL); 653 inet->saddr, inet->daddr, NULL);
652 if (err == NET_XMIT_CN) 654 if (err == NET_XMIT_CN)
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}
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index a1cfd0e9e3bc..a021c3422f67 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -402,8 +402,6 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
402 * This bug was _quickly_ found & fixed by just looking at an OSTRA 402 * This bug was _quickly_ found & fixed by just looking at an OSTRA
403 * generated callgraph 8) -acme 403 * generated callgraph 8) -acme
404 */ 404 */
405 if (rc != 0)
406 goto out_discard;
407out_release: 405out_release:
408 release_sock(sk); 406 release_sock(sk);
409 return rc ? : len; 407 return rc ? : len;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 7114031fdc70..b907456a79f4 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -435,17 +435,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
435 int nsize, old_factor; 435 int nsize, old_factor;
436 u16 flags; 436 u16 flags;
437 437
438 if (unlikely(len >= skb->len)) { 438 BUG_ON(len > skb->len);
439 if (net_ratelimit()) {
440 printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
441 "end_seq=%u, skb->len=%u.\n", len, mss_now,
442 TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
443 skb->len);
444 WARN_ON(1);
445 }
446 return 0;
447 }
448
449 nsize = skb_headlen(skb) - len; 439 nsize = skb_headlen(skb) - len;
450 if (nsize < 0) 440 if (nsize < 0)
451 nsize = 0; 441 nsize = 0;