* [PATCH net-next V2] tcp: Fix build break when CONFIG_IPV6=n
@ 2022-11-22 18:41 Saeed Mahameed
2022-11-22 18:48 ` Eric Dumazet
2022-11-23 4:52 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Saeed Mahameed @ 2022-11-22 18:41 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
Cc: Saeed Mahameed, netdev, Tariq Toukan, Geert Uytterhoeven,
Matthieu Baerts, Jamie Bainbridge
From: Saeed Mahameed <saeedm@nvidia•com>
The cited commit caused the following build break when CONFIG_IPV6 was
disabled
net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
Fix by using inet6_rcv_saddr() macro which handles this situation
nicely.
Fixes: d9282e48c608 ("tcp: Add listening address to SYN flood message")
Signed-off-by: Saeed Mahameed <saeedm@nvidia•com>
Reported-by: Geert Uytterhoeven <geert+renesas@glider•be>
CC: Matthieu Baerts <matthieu.baerts@tessares•net>
CC: Jamie Bainbridge <jamie.bainbridge@gmail•com>
---
v1->v2:
- Keep IS_ENABLED(CONFIG_IPV6) in the if condition
net/ipv4/tcp_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 0ae291e53eab..1efacbe948da 100644
--- 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),
sk->sk_num, msg);
} else {
net_info_ratelimited("%s: Possible SYN flooding on port %pI4:%u. %s.\n",
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next V2] tcp: Fix build break when CONFIG_IPV6=n
2022-11-22 18:41 [PATCH net-next V2] tcp: Fix build break when CONFIG_IPV6=n Saeed Mahameed
@ 2022-11-22 18:48 ` Eric Dumazet
2022-11-23 4:52 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2022-11-22 18:48 UTC (permalink / raw)
To: Saeed Mahameed
Cc: David S. Miller, Jakub Kicinski, Paolo Abeni, Saeed Mahameed,
netdev, Tariq Toukan, Geert Uytterhoeven, Matthieu Baerts,
Jamie Bainbridge
On Tue, Nov 22, 2022 at 10:42 AM Saeed Mahameed <saeed@kernel•org> wrote:
>
> From: Saeed Mahameed <saeedm@nvidia•com>
>
> The cited commit caused the following build break when CONFIG_IPV6 was
> disabled
>
> net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
> include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
>
> Fix by using inet6_rcv_saddr() macro which handles this situation
> nicely.
>
> Fixes: d9282e48c608 ("tcp: Add listening address to SYN flood message")
> Signed-off-by: Saeed Mahameed <saeedm@nvidia•com>
> Reported-by: Geert Uytterhoeven <geert+renesas@glider•be>
> CC: Matthieu Baerts <matthieu.baerts@tessares•net>
> CC: Jamie Bainbridge <jamie.bainbridge@gmail•com>
Thanks.
Reviewed-by: Eric Dumazet <edumazet@google•com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next V2] tcp: Fix build break when CONFIG_IPV6=n
2022-11-22 18:41 [PATCH net-next V2] tcp: Fix build break when CONFIG_IPV6=n Saeed Mahameed
2022-11-22 18:48 ` Eric Dumazet
@ 2022-11-23 4:52 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-23 4:52 UTC (permalink / raw)
To: Saeed Mahameed
Cc: davem, kuba, pabeni, edumazet, saeedm, netdev, tariqt,
geert+renesas, matthieu.baerts, jamie.bainbridge
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel•org>:
On Tue, 22 Nov 2022 10:41:58 -0800 you wrote:
> From: Saeed Mahameed <saeedm@nvidia•com>
>
> The cited commit caused the following build break when CONFIG_IPV6 was
> disabled
>
> net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
> include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
>
> [...]
Here is the summary with links:
- [net-next,V2] tcp: Fix build break when CONFIG_IPV6=n
https://git.kernel.org/netdev/net-next/c/c90b6b1005ec
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-23 4:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22 18:41 [PATCH net-next V2] tcp: Fix build break when CONFIG_IPV6=n Saeed Mahameed
2022-11-22 18:48 ` Eric Dumazet
2022-11-23 4:52 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox