lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] tcp: Fix tcp_syn_flood_action() if CONFIG_IPV6=n
On Mon, 21 Nov 2022 14:44:19 -0800 Saeed Mahameed wrote:
> there's a macro inet6_rcv_saddr(sk), we can use it instead of directly
> referencing &sk->sk_v6_rcv_saddr, it already handles the case where
> CONFIG_IPV6=n
>
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -6845,7 +6845,7 @@ static bool tcp_syn_flood_action(const struct sock *sk, const char *proto)
> xchg(&queue->synflood_warned, 1) == 0) {
> if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
> net_info_ratelimited("%s: Possible SYN flooding on port [%pI6c]:%u. %s.\n",
> - proto, &sk->sk_v6_rcv_saddr,
> + proto, inet6_rcv_saddr(sk),

Great, could you post a full patch? I haven't seen v2, now it's almost
Thanksgiving..

\
 
 \ /
  Last update: 2022-11-22 04:53    [W:0.211 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site