Skip to content

Commit

Permalink
tcp: remove redundant checks II
Browse files Browse the repository at this point in the history
For same reasons than in commit 12e25e1 ("tcp: remove redundant
checks"), we can remove redundant checks done for timewait sockets.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 7, 2015
1 parent 908e80d commit 98da81a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 98da81a

Please sign in to comment.