Dmitry Safonov 4c8530dc7d net/tcp: Only produce AO/MD5 logs if there are any keys
User won't care about inproper hash options in the TCP header if they
don't use neither TCP-AO nor TCP-MD5. Yet, those logs can add up in
syslog, while not being a real concern to the host admin:
> kernel: TCP: TCP segment has incorrect auth options set for XX.20.239.12.54681->XX.XX.90.103.80 [S]

Keep silent and avoid logging when there aren't any keys in the system.

Side-note: I also defined static_branch_tcp_*() helpers to avoid more
ifdeffery, going to remove more ifdeffery further with their help.

Reported-by: Christian Kujau <lists@nerdbynature.de>
Closes: https://lore.kernel.org/all/f6b59324-1417-566f-a976-ff2402718a8d@nerdbynature.de/
Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Fixes: 2717b5adea9e ("net/tcp: Add tcp_hash_fail() ratelimited logs")
Link: https://lore.kernel.org/r/20240104-tcp_hash_fail-logs-v1-1-ff3e1f6f9e72@arista.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-04 09:07:04 -08:00
..
2022-08-09 22:14:02 -07:00
2023-10-24 13:08:14 -07:00
2023-10-25 18:04:29 -07:00
2021-12-16 07:18:35 -08:00
2023-11-02 09:31:02 +01:00
2021-10-15 11:33:08 +01:00
2023-09-06 06:05:59 +01:00
2023-04-22 01:39:41 +02:00
2023-10-30 14:36:57 -07:00
2021-10-13 09:40:46 -07:00
2023-08-22 17:31:18 -07:00
2022-05-11 12:43:10 +01:00
2023-07-14 20:39:30 -07:00
2023-10-01 13:20:36 +01:00
2023-10-04 11:49:20 -07:00
2023-02-16 09:27:07 +01:00
2023-10-23 15:01:53 -07:00
2023-07-28 14:07:59 -07:00
2022-12-12 15:04:39 -08:00
2023-09-14 16:16:36 +02:00
2023-08-02 10:58:26 +01:00
2023-07-19 09:56:49 -07:00
2023-07-19 09:56:49 -07:00