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

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

On Wed, Dec 07, 2022 at 03:29:37PM +0100, Heinrich Schuchardt wrote:
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@canonical.com
Do we have a unit trest of IPv6? I guess we should at least do a IPv6 ping.
There are a few tests, yes, but more would be good.

On Wed, 2022-12-07 at 09:42 -0500, Tom Rini wrote:
On Wed, Dec 07, 2022 at 03:29:37PM +0100, Heinrich Schuchardt wrote:
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@canonical.com>
Do we have a unit trest of IPv6? I guess we should at least do a IPv6 ping.
There are a few tests, yes, but more would be good.
Hello!
I have tested IPv6 (ping6 and tftpboot) with my own python scripts before sending to pathwork. I'll do some test conversion to use them with u-boot or add new tests for that soon! Thanks!

On 12/7/22 06:52, Vyacheslav Mitrofanov V wrote:
On Wed, 2022-12-07 at 09:42 -0500, Tom Rini wrote:
On Wed, Dec 07, 2022 at 03:29:37PM +0100, Heinrich Schuchardt wrote:
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@canonical.com>
Do we have a unit trest of IPv6? I guess we should at least do a IPv6 ping.
There are a few tests, yes, but more would be good.
Hello!
I have tested IPv6 (ping6 and tftpboot) with my own python scripts before sending to pathwork. I'll do some test conversion to use them with u-boot or add new tests for that soon! Thanks!
Hello Vycheslav,
would you agree with that break being added? I didn't see a review response.
Best regards
Heinrich

On Mon, 2022-12-12 at 06:19 -0800, Heinrich Schuchardt wrote:
«Внимание! Данное письмо от внешнего адресата!»
On 12/7/22 06:52, Vyacheslav Mitrofanov V wrote:
On Wed, 2022-12-07 at 09:42 -0500, Tom Rini wrote:
On Wed, Dec 07, 2022 at 03:29:37PM +0100, Heinrich Schuchardt wrote:
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@canonical.com>
Do we have a unit trest of IPv6? I guess we should at least do a IPv6 ping.
There are a few tests, yes, but more would be good.
Hello!
I have tested IPv6 (ping6 and tftpboot) with my own python scripts before sending to pathwork. I'll do some test conversion to use them with u-boot or add new tests for that soon! Thanks!
Hello Vycheslav,
would you agree with that break being added? I didn't see a review response.
Best regards
Heinrich
Hello, Heinrich. I'm sorry for the long response, your mail got to spam folder.
Yes I do agree with you that missing break has to be there. I have already sent reviewed sign to your patch.
Many thanks for your work!
P.S. As I promised I'll add soon new tests but it is still in process. Very heavy schedule by the end of the year...

On Wed, 2022-12-07 at 15:29 +0100, Heinrich Schuchardt wrote:
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@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
Reviewed-by: Viacheslav Mitrofanov v.v.mitrofanov@yadro.com
participants (4)
-
Heinrich Schuchardt
-
Mitrofanov Vyacheslav V.
-
Tom Rini
-
Vyacheslav Mitrofanov V