[PATCH 1/1] net: missing break after net_ip6_handler()

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Wed Dec 7 15:29:37 CET 2022


Don't fall through to handling an IPv6 header as IPv4.

Fixes: ffdbf3bad5f3 ("net: ipv6: Incorporate IPv6 support into u-boot net subsystem")
Addresses-Coverity-ID: 430975 ("Missing break in switch")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
Do we have a unit trest of IPv6?
I guess we should at least do a IPv6 ping.
---
 net/net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/net.c b/net/net.c
index 1c39acc493..57da9bda85 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1269,6 +1269,7 @@ void net_process_received_packet(uchar *in_packet, int len)
 #if IS_ENABLED(CONFIG_IPV6)
 	case PROT_IP6:
 		net_ip6_handler(et, (struct ip6_hdr *)ip, len);
+		break;
 #endif
 	case PROT_IP:
 		debug_cond(DEBUG_NET_PKT, "Got IP\n");
-- 
2.37.2



More information about the U-Boot mailing list