Commit 98da81a4 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: remove redundant checks II

For same reasons than in commit 12e25e10 ("tcp: remove redundant
checks"), we can remove redundant checks done for timewait sockets.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 908e80d6
......@@ -1671,10 +1671,6 @@ int tcp_v4_rcv(struct sk_buff *skb)
goto discard_it;
}
if (skb->len < (th->doff << 2)) {
inet_twsk_put(inet_twsk(sk));
goto bad_packet;
}
if (tcp_checksum_complete(skb)) {
inet_twsk_put(inet_twsk(sk));
goto csum_error;
......
......@@ -1467,10 +1467,6 @@ static int tcp_v6_rcv(struct sk_buff *skb)
tcp_v6_fill_cb(skb, hdr, th);
if (skb->len < (th->doff<<2)) {
inet_twsk_put(inet_twsk(sk));
goto bad_packet;
}
if (tcp_checksum_complete(skb)) {
inet_twsk_put(inet_twsk(sk));
goto csum_error;
......
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