Eric Dumazet 843f77407e tcp: fix signed/unsigned comparison
Kernel test robot reported:

smatch warnings:
net/ipv4/tcp_input.c:5966 tcp_rcv_established() warn: unsigned 'reason' is never less than zero.

I actually had one packetdrill failing because of this bug,
and was about to send the fix :)

v2: Andreas Schwab also pointed out that @reason needs to be negated
    before we reach tcp_drop_reason()

Fixes: 4b506af9c5b8 ("tcp: add two drop reasons for tcp_ack()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-04-18 10:28:40 +01:00
..
2021-06-30 15:51:09 -07:00
2022-04-12 14:56:33 -07:00
2021-05-17 15:29:35 -07:00
2021-11-14 12:20:44 +00:00
2021-10-13 09:41:37 -07:00
2021-10-13 09:41:37 -07:00
2021-06-30 15:51:09 -07:00
2021-10-13 09:41:37 -07:00
2022-04-12 14:56:33 -07:00
2021-05-17 15:29:35 -07:00
2021-11-16 19:07:54 -08:00
2021-05-17 15:29:35 -07:00
2021-05-17 15:29:35 -07:00