All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ipv6: Add missing break into IPv6 protocol handler
@ 2022-12-06  7:08 Viacheslav Mitrofanov
  2022-12-06 12:21 ` Daniel Schwierzeck
  2022-12-23 15:00 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Viacheslav Mitrofanov @ 2022-12-06  7:08 UTC (permalink / raw)
  Cc: v.v.mitrofanov, rfried.dev, joe.hershberger, wd, u-boot,
	judge.packham, linux, daniel.schwierzeck

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(+)

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.30.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ipv6: Add missing break into IPv6 protocol handler
  2022-12-06  7:08 [PATCH] net: ipv6: Add missing break into IPv6 protocol handler Viacheslav Mitrofanov
@ 2022-12-06 12:21 ` Daniel Schwierzeck
  2022-12-23 15:00 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Schwierzeck @ 2022-12-06 12:21 UTC (permalink / raw)
  To: Viacheslav Mitrofanov
  Cc: rfried.dev, joe.hershberger, wd, u-boot, judge.packham, linux



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ipv6: Add missing break into IPv6 protocol handler
  2022-12-06  7:08 [PATCH] net: ipv6: Add missing break into IPv6 protocol handler Viacheslav Mitrofanov
  2022-12-06 12:21 ` Daniel Schwierzeck
@ 2022-12-23 15:00 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-12-23 15:00 UTC (permalink / raw)
  To: Viacheslav Mitrofanov
  Cc: rfried.dev, joe.hershberger, wd, u-boot, judge.packham, linux,
	daniel.schwierzeck

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

On Tue, Dec 06, 2022 at 10:08:16AM +0300, 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>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-23 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06  7:08 [PATCH] net: ipv6: Add missing break into IPv6 protocol handler Viacheslav Mitrofanov
2022-12-06 12:21 ` Daniel Schwierzeck
2022-12-23 15:00 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.