tcp: add TCP_OLD_SEQUENCE drop reason
authorEric Dumazet <edumazet@google.com>
Wed, 19 Jul 2023 06:47:54 +0000 (06:47 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 20 Jul 2023 10:49:40 +0000 (12:49 +0200)
commitb44693495af8f309b8ddec4b30833085d1c2d0c4
tree5ef6c99b79c43851bb837d7904fed7c6a2cab2f8
parentaf1e2cffbd2ef338b1d2e7318cb2516cc6380303
tcp: add TCP_OLD_SEQUENCE drop reason

tcp_sequence() uses two conditions to decide to drop a packet,
and we currently report generic TCP_INVALID_SEQUENCE drop reason.

Duplicates are common, we need to distinguish them from
the other case.

I chose to not reuse TCP_OLD_DATA, and instead added
TCP_OLD_SEQUENCE drop reason.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230719064754.2794106-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/dropreason-core.h
net/ipv4/tcp_input.c