Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8956
b: refs/heads/master
c: 3c05d92
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Sep 15, 2005
1 parent 1296464 commit 3ad44e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1619cca2921f6927f4240e03f413d4165c7002fc
refs/heads/master: 3c05d92ed49f644d1f5a960fa48637d63b946016
16 changes: 9 additions & 7 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,14 +979,19 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
if (!before(TCP_SKB_CB(skb)->seq, end_seq))
break;

in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) &&
!before(end_seq, TCP_SKB_CB(skb)->end_seq);

pcount = tcp_skb_pcount(skb);

if (pcount > 1 &&
(after(start_seq, TCP_SKB_CB(skb)->seq) ||
before(end_seq, TCP_SKB_CB(skb)->end_seq))) {
if (pcount > 1 && !in_sack &&
after(TCP_SKB_CB(skb)->end_seq, start_seq)) {
unsigned int pkt_len;

if (after(start_seq, TCP_SKB_CB(skb)->seq))
in_sack = !after(start_seq,
TCP_SKB_CB(skb)->seq);

if (!in_sack)
pkt_len = (start_seq -
TCP_SKB_CB(skb)->seq);
else
Expand All @@ -999,9 +1004,6 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_

fack_count += pcount;

in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) &&
!before(end_seq, TCP_SKB_CB(skb)->end_seq);

sacked = TCP_SKB_CB(skb)->sacked;

/* Account D-SACK for retransmitted packet. */
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
int nsize, old_factor;
u16 flags;

BUG_ON(len >= skb->len);

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

0 comments on commit 3ad44e1

Please sign in to comment.