summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-12-06 07:40:47 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-06 07:40:47 +0100
commitf0bc52f38b09308fca85f3aa9300a341364fe9c6 (patch)
treebe77bd3df702eee48849c4a29fdf9d870b30809f /net/ipv4/tcp_input.c
parentdccp: use roundup instead of opencoding (diff)
downloadlinux-f0bc52f38b09308fca85f3aa9300a341364fe9c6.tar.xz
linux-f0bc52f38b09308fca85f3aa9300a341364fe9c6.zip
tcp: force mss equality with the next skb too.
Also make if-goto forest nicer looking. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d67b6e9cc540..63c3ef6d4a1c 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1575,11 +1575,10 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
goto out;
skb = tcp_write_queue_next(sk, prev);
- if (!skb_can_shift(skb))
- goto out;
- if (skb == tcp_send_head(sk))
- goto out;
- if ((TCP_SKB_CB(skb)->sacked & TCPCB_TAGBITS) != TCPCB_SACKED_ACKED)
+ if (!skb_can_shift(skb) ||
+ (skb == tcp_send_head(sk)) ||
+ ((TCP_SKB_CB(skb)->sacked & TCPCB_TAGBITS) != TCPCB_SACKED_ACKED) ||
+ (mss != tcp_shift_mss(skb)))
goto out;
len = skb->len;