public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Cc: rfried.dev@gmail.com, joe.hershberger@ni.com, wd@denx.de,
	u-boot@lists.denx.de, judge.packham@gmail.com, linux@yadro.com
Subject: Re: [PATCH] net: ipv6: Add missing break into IPv6 protocol handler
Date: Tue, 6 Dec 2022 13:21:33 +0100	[thread overview]
Message-ID: <fc05e300-e00f-31bd-1ad1-d2af5377ba18@gmail.com> (raw)
In-Reply-To: <20221206070816.2453839-1-v.v.mitrofanov@yadro.com>



On 12/6/22 08:08, Viacheslav Mitrofanov wrote:
> 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>
> ---
>   net/net.c | 1 +
>   1 file changed, 1 insertion(+)
> 

thanks for the quick fix

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

> 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");

-- 
- Daniel

  reply	other threads:[~2022-12-06 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  7:08 [PATCH] net: ipv6: Add missing break into IPv6 protocol handler Viacheslav Mitrofanov
2022-12-06 12:21 ` Daniel Schwierzeck [this message]
2022-12-23 15:00 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc05e300-e00f-31bd-1ad1-d2af5377ba18@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=judge.packham@gmail.com \
    --cc=linux@yadro.com \
    --cc=rfried.dev@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=v.v.mitrofanov@yadro.com \
    --cc=wd@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox