Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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;
+0 −4
Original line number Diff line number Diff line
@@ -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;