OSDN Git Service

net/tcp: Merge TCP-MD5 inbound callbacks
authorDmitry Safonov <dima@arista.com>
Wed, 23 Feb 2022 17:57:40 +0000 (17:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Feb 2022 05:43:53 +0000 (21:43 -0800)
commit7bbb765b73496699a165d505ecdce962f903b422
treefbeff4cccbc36e575e1e029f5dd0ce248f79798b
parent53110c67e3358f1b9a6f0f6997d3beef7832aa40
net/tcp: Merge TCP-MD5 inbound callbacks

The functions do essentially the same work to verify TCP-MD5 sign.
Code can be merged into one family-independent function in order to
reduce copy'n'paste and generated code.
Later with TCP-AO option added, this will allow to create one function
that's responsible for segment verification, that will have all the
different checks for MD5/AO/non-signed packets, which in turn will help
to see checks for all corner-cases in one function, rather than spread
around different families and functions.

Cc: Eric Dumazet <edumazet@google.com>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220223175740.452397-1-dima@arista.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c