From owner-freebsd-hackers Thu Mar 23 16: 8:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 5FE6337B9FD for ; Thu, 23 Mar 2000 16:08:08 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p39-dn02kiryunisiki.gunma.ocn.ne.jp [211.0.245.104]) by peach.ocn.ne.jp (8.9.1a/OCN) with ESMTP id JAA18217; Fri, 24 Mar 2000 09:07:55 +0900 (JST) Message-ID: <38DAAB22.5430E144@newsguy.com> Date: Fri, 24 Mar 2000 08:39:14 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Matthew Dillon Cc: Jim Mercer , hackers@FreeBSD.ORG Subject: Re: Doh, compiler bug... (was Re: possible bug in kernel/if_ether.c) References: <20000322225639.T983@reptiles.org> <200003230515.VAA96507@apollo.backplane.com> <20000323054731.W983@reptiles.org> <200003231829.KAA02591@apollo.backplane.com> <200003231855.KAA02948@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon wrote: > > I found it. The code itself is broken. I missed the lack of parens. > > if (m->m_len < sizeof(struct arphdr) && > (m = m_pullup(m, sizeof(struct arphdr)) == NULL)) { > log(LOG_ERR, "arp: runt packet -- m_pullup failed."); > continue; > > Should be: > > if (m->m_len < sizeof(struct arphdr) && > ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { > log(LOG_ERR, "arp: runt packet -- m_pullup failed."); > continue; > > I'm committing the fix now. Funny. The parenthesis was the FIRST thing I noticed. I just assumed I was remembering the priorities wrong... -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@zurichgnomes.bsdconspiracy.net One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone bind them. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message