From owner-cvs-all@FreeBSD.ORG Fri Dec 12 00:54:49 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C636F16A4CE; Fri, 12 Dec 2003 00:54:49 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CE0243D36; Fri, 12 Dec 2003 00:54:49 -0800 (PST) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hBC8smXJ099293; Fri, 12 Dec 2003 00:54:48 -0800 (PST) (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hBC8smOY099292; Fri, 12 Dec 2003 00:54:48 -0800 (PST) (envelope-from wpaul) Message-Id: <200312120854.hBC8smOY099292@repoman.freebsd.org> From: Bill Paul Date: Fri, 12 Dec 2003 00:54:48 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/ndis kern_ndis.c subr_ndis.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 08:54:49 -0000 wpaul 2003/12/12 00:54:48 PST FreeBSD src repository Modified files: sys/compat/ndis kern_ndis.c subr_ndis.c Log: Correct the behavior of ndis_adjust_buflen(): the NDIS spec says it's an error to set the buffer bytecount to anything larger than the buffer's original allocation size, but anything less than that is ok. Also, in ndis_ptom(), use the same logic: if the bytecount is larger than the allocation size, consider the bytecount invalid and the allocation size as the packet fragment length (m_len) instead of the bytecount. This corrects a consistency problem between the Broadcom wireless driver and some of the ethernet drivers I've tested: the ethernet drivers all report the packet frag sizes in buf->nb_bytecount, but the Broadcom wireless driver reports them in buf->nb_size. This seems like a bug to me, but it clearly must work in Windows, so we have to deal with it here too. Revision Changes Path 1.3 +1 -1 src/sys/compat/ndis/kern_ndis.c 1.2 +10 -3 src/sys/compat/ndis/subr_ndis.c