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

Reinhard Arlt reinhard.arlt at t-online.de
Mon May 2 21:47:49 CEST 2005


Hallo,

if you look at the code for ICMP handling in NetReceive, you will see that:

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

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.

Else the comment after  "(ip_>ip_p != IPPROTO_UDP)" should be corrected.

Reinhard








More information about the U-Boot mailing list