From owner-svn-src-stable@FreeBSD.ORG Fri Jun 1 17:22:20 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E90FD106564A; Fri, 1 Jun 2012 17:22:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4D918FC17; Fri, 1 Jun 2012 17:22:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51HMKUH032529; Fri, 1 Jun 2012 17:22:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51HMKm3032527; Fri, 1 Jun 2012 17:22:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206011722.q51HMKm3032527@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 17:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236411 - stable/8/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 17:22:21 -0000 Author: jkim Date: Fri Jun 1 17:22:20 2012 New Revision: 236411 URL: http://svn.freebsd.org/changeset/base/236411 Log: MFC: r236251 Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor and reset statistics as it should. Modified: stable/8/sys/net/bpf.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Fri Jun 1 17:17:46 2012 (r236410) +++ stable/8/sys/net/bpf.c Fri Jun 1 17:22:20 2012 (r236411) @@ -1498,13 +1498,23 @@ bpf_setf(struct bpf_d *d, struct bpf_pro struct bpf_program32 *fp32; struct bpf_program fp_swab; - if (cmd == BIOCSETWF32 || cmd == BIOCSETF32 || cmd == BIOCSETFNR32) { + switch (cmd) { + case BIOCSETF32: + case BIOCSETWF32: + case BIOCSETFNR32: fp32 = (struct bpf_program32 *)fp; fp_swab.bf_len = fp32->bf_len; fp_swab.bf_insns = (struct bpf_insn *)(uintptr_t)fp32->bf_insns; fp = &fp_swab; - if (cmd == BIOCSETWF32) + switch (cmd) { + case BIOCSETF32: + cmd = BIOCSETF; + break; + case BIOCSETWF32: cmd = BIOCSETWF; + break; + } + break; } #endif if (cmd == BIOCSETWF) {