]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: ipv6: Add missing break into IPv6 protocol handler
authorViacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Tue, 6 Dec 2022 07:08:16 +0000 (10:08 +0300)
committerTom Rini <trini@konsulko.com>
Thu, 22 Dec 2022 20:39:13 +0000 (15:39 -0500)
IPv6 protocol handler is not terminated with a break statment.
It can lead to running unexpected code.

Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
net/net.c

index 1c39acc4936c4669546f8936e64cf519c76008bb..57da9bda85af994b98254fab600b5cf0c1e40260 100644 (file)
--- 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");