From owner-cvs-src-old@FreeBSD.ORG Mon Mar 28 16:59:05 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7073410657C9 for ; Mon, 28 Mar 2011 16:59:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 603CA8FC14 for ; Mon, 28 Mar 2011 16:59:05 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p2SGx5rF073274 for ; Mon, 28 Mar 2011 16:59:05 GMT (envelope-from yongari@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p2SGx5NR073273 for cvs-src-old@freebsd.org; Mon, 28 Mar 2011 16:59:05 GMT (envelope-from yongari@repoman.freebsd.org) Message-Id: <201103281659.p2SGx5NR073273@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to yongari@repoman.freebsd.org using -f From: Pyun YongHyeon Date: Mon, 28 Mar 2011 16:58:48 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/fxp if_fxp.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2011 16:59:05 -0000 yongari 2011-03-28 16:58:48 UTC FreeBSD src repository Modified files: sys/dev/fxp if_fxp.c Log: SVN rev 220103 on 2011-03-28 16:58:48Z by yongari Normally fxp(4) does not receive bad frames but promiscuous mode makes controller to receive bad frames and i82557 will also receive bad frames since fxp(4) have to receive VLAN oversized frames. If fxp(4) encounter DMA overrun error, the received frame size would be 0 so the actual frame size after checksum field extraction the length would be negative(-2). Due to signed/unsigned comparison used in driver, frame length check did not work for DMA overrun frames. Correct this by casting it to int. While I'm here explicitly check DMA overrun error and discard the frame regardless of result of received frame length check. Reported by: n_hibma Tested by: n_hibma MFC after: 1 week Revision Changes Path 1.315 +2 -2 src/sys/dev/fxp/if_fxp.c