From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Arlt Date: Mon, 09 May 2005 10:12:11 +0200 Subject: [U-Boot-Users] Strange code in NetReceive(..) in net.c In-Reply-To: <20050502204440.B868FC1510@atlas.denx.de> References: <20050502204440.B868FC1510@atlas.denx.de> Message-ID: <427F1B5B.7010603@t-online.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, here is the patch for the two missing statements. Reinhard Wolfgang Denk wrote: > In message <427683E5.5050608@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? 1.1.2 > > >>-- 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 > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Changelog Url: http://lists.denx.de/pipermail/u-boot/attachments/20050509/ac73d6e7/attachment.txt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: net_missing_return_patch Url: http://lists.denx.de/pipermail/u-boot/attachments/20050509/ac73d6e7/attachment-0001.txt