Eric Dumazet e62d2e1103 tcp: md5: fix IPv4-mapped support
After the blamed commit, IPv4 SYN packets handled
by a dual stack IPv6 socket are dropped, even if
perfectly valid.

$ nstat | grep MD5
TcpExtTCPMD5Failure             5                  0.0

For a dual stack listener, an incoming IPv4 SYN packet
would call tcp_inbound_md5_hash() with @family == AF_INET,
while tp->af_specific is pointing to tcp_sock_ipv6_specific.

Only later when an IPv4-mapped child is created, tp->af_specific
is changed to tcp_sock_ipv6_mapped_specific.

Fixes: 7bbb765b7349 ("net/tcp: Merge TCP-MD5 inbound callbacks")
Reported-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Tested-by: Leonard Crestez <cdleonard@gmail.com>
Link: https://lore.kernel.org/r/20220726115743.2759832-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-27 10:18:21 -07:00
..
2022-07-12 12:58:53 +02:00
2022-05-25 12:22:58 -07:00
2022-07-12 12:58:53 +02:00
2022-04-12 14:56:33 -07:00
2021-05-17 15:29:35 -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-30 15:12:58 +01:00
2022-04-12 14:56:33 -07:00
2021-05-17 15:29:35 -07:00
2022-07-27 10:18:21 -07:00
2021-05-17 15:29:35 -07:00
2022-05-16 10:31:06 +01:00
2021-05-17 15:29:35 -07:00