[U-Boot-Users] Strange code in NetReceive(..) in net.c

Wolfgang Denk wd at denx.de
Mon May 2 22:44:35 CEST 2005


In message <427683E5.5050608 at t-online.de> you wrote:
> 
> if you look at the code for ICMP handling in NetReceive, you will see that:

Which version of the code are you talking about?

> -- For an ICMP_REDIR_HOST packet, the nc_input_packet code and then the 
> (*packetHandler) is called.
> 
> -- For an ICMP_ECHO_REPLY, the (*packetHandler) is called twice.
> 
> Is this is not intended, i can prepare a patch.

We should probably have "return"s in both "case"s. Lokking forward to
see your patch.

> A "return" before the "break" in the ICMP_PROTO path and an "return" 
> before the "break" in the ICMP_ECHO_REPLY path will do it.

Agreed.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No one can guarantee the actions of another.
	-- Spock, "Day of the Dove", stardate unknown




More information about the U-Boot mailing list