Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Oct 2004 00:17:29 +0100
From:      Juan Rodriguez <juan.fco.rodriguez@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   if_ed.c "NIC memory corrupt - invalid packet length" error
Message-ID:  <96b30c400410211617466e7ea9@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I'm getting this error now and then, so I've tried to look at the 
file "if_ed.c" where the message is printed to sort it out... 

I'd be glad if somebody could tell me what's the reason of this line
inside "ed_rint()" function:

         /*
          * because buffers are aligned on 256-byte boundary,
          * the length computed above is off by 256 in almost
          * all cases. Fix it...
          */
          if (len & 0xff)
                 len -= 256 ;

I wonder what can happen here if we've got a length value
that is less than 256. We could end up with a negative value...
could it be this the source that causes the problem ?

PS: I'm kinda newbie so I might be saying stupid things! :)
Thanks



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96b30c400410211617466e7ea9>