if_ed.c "NIC memory corrupt - invalid packet length" error

Luigi Rizzo rizzo at icir.org
Thu Oct 21 16:27:48 PDT 2004


On Fri, Oct 22, 2004 at 12:17:29AM +0100, Juan Rodriguez wrote:
> 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... 

most of the time the message is because of a runt packet, or
a residue of some collision, or the like. I'd probably just
comment out the printf() if it bothers you.

> 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

well because the comment refers to the code above, you should
supply that as well or there is nothing we can comment about.
Apart from that, i vaguely remember having touched this part
of the code and it was taking care of bugs in the NIC which 
at times would compute a wrong length. In any case it is mostly
unrelated to the above which has an easier explaination

cheers
luigi

> 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
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list