Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Oct 21, 2005
2 parents e29971f + b2cc99f commit cffc7b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
2 changes: 2 additions & 0 deletions net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
if (skb != NULL) {
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,
ireq->rmt_addr,
ireq->opt);
Expand Down Expand Up @@ -647,6 +648,7 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
if (skb != NULL) {
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,
inet->saddr, inet->daddr, NULL);
if (err == NET_XMIT_CN)
Expand Down
10 changes: 5 additions & 5 deletions net/dccp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)

skb->h.raw = skb_push(skb, dccp_header_size);
dh = dccp_hdr(skb);
/*
* Data packets are not cloned as they are never retransmitted
*/
if (skb_cloned(skb))

if (!skb->sk)
skb_set_owner_w(skb, sk);

/* Build DCCP header and checksum it. */
Expand Down Expand Up @@ -102,6 +100,7 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)

DCCP_INC_STATS(DCCP_MIB_OUTSEGS);

memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_queue_xmit(skb, 0);
if (err <= 0)
return err;
Expand Down Expand Up @@ -243,7 +242,8 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo)

err = dccp_transmit_skb(sk, skb);
ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len);
}
} else
kfree_skb(skb);

return err;
}
Expand Down
2 changes: 0 additions & 2 deletions net/dccp/proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* generated callgraph 8) -acme
*/
if (rc != 0)
goto out_discard;
out_release:
release_sock(sk);
return rc ? : len;
Expand Down
12 changes: 1 addition & 11 deletions net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
int nsize, old_factor;
u16 flags;

if (unlikely(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;
}

BUG_ON(len > skb->len);
nsize = skb_headlen(skb) - len;
if (nsize < 0)
nsize = 0;
Expand Down

0 comments on commit cffc7b3

Please sign in to comment.