This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 78d09ee6dfdc215e25849d1295d8a7cd16bfbfac Author: Marco Casaroli <[email protected]> AuthorDate: Thu Nov 26 06:26:45 2026 +0100 net/icmp: Do not enable the ICMP stacks without their IP version. NET_ICMP and NET_ICMPv6 had no dependency on NET_IPv4 and NET_IPv6. If a configuration with ICMP sockets turned off IPv4 (or IPv6), the option stayed set, and icmp_sockif.c (icmpv6_sockif.c) did not compile: ipv4_getsockopt() and ipv4_setsockopt() (ipv6_getsockopt() and ipv6_setsockopt()) are declared only with that IP version. Show the NET_ICMP prompt only with NET_IPv4 and the NET_ICMPv6 prompt only with NET_IPv6. Without the IP version, the option is now n unless NET_ICMP_NO_STACK or NET_ICMPv6_NO_STACK selects it. A "depends on" would break that select: a user-space stack (NET_USRSOCK_ICMPv6, for example sim:wakaama) gives ICMP sockets without the IP version in the kernel. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- net/icmp/Kconfig | 2 +- net/icmpv6/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/icmp/Kconfig b/net/icmp/Kconfig index d694df041a5..946b1f04041 100644 --- a/net/icmp/Kconfig +++ b/net/icmp/Kconfig @@ -27,7 +27,7 @@ menu "ICMP Networking Support" config NET_ICMP - bool "Enable ICMP networking" + bool "Enable ICMP networking" if NET_IPv4 default NET_IPv4 ---help--- Enable minimal ICMP support. Includes built-in support diff --git a/net/icmpv6/Kconfig b/net/icmpv6/Kconfig index d95479a6f35..78027935e0d 100644 --- a/net/icmpv6/Kconfig +++ b/net/icmpv6/Kconfig @@ -27,7 +27,7 @@ menu "ICMPv6 Networking Support" config NET_ICMPv6 - bool "Enable ICMPv6 networking" + bool "Enable ICMPv6 networking" if NET_IPv6 default n select NET_MCASTGROUP depends on NET
