Subject: Re: dev/sbus/be.c: typo bug?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 11/05/2005 17:02:24
On Fri, Nov 04, 2005 at 01:59:26AM -0500, der Mouse wrote:
> I went looking at -current's source to see which ethernet drivers
> supported which ethercap bits. Grepping for ETHERCAP in dev/sbus
> turned up only one hit, be.c. But one line looked odd:
>
> len > ETHER_MAX_LEN + ETHERCAP_VLAN_MTU) {
>
> Looking at the context, I find
>
> if (len <= sizeof(struct ether_header) ||
> len > ETHER_MAX_LEN + ETHERCAP_VLAN_MTU) {
> #ifdef BEDEBUG
> ...
> #endif
> ifp->if_ierrors++;
> return;
> }
>
> This doesn't look right to me. Surely it should be
> ETHER_VLAN_ENCAP_LEN, not ETHERCAP_VLAN_MTU?
Sure. Thanks for pointing out, I've commited the fix.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--