From owner-svn-src-stable-8@FreeBSD.ORG Thu Sep 16 15:07:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A48106566C; Thu, 16 Sep 2010 15:07:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2E3A8FC12; Thu, 16 Sep 2010 15:07:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GF7CYM095060; Thu, 16 Sep 2010 15:07:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GF7ClL095058; Thu, 16 Sep 2010 15:07:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161507.o8GF7ClL095058@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 15:07:12 +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: r212737 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:07:12 -0000 Author: glebius Date: Thu Sep 16 15:07:12 2010 New Revision: 212737 URL: http://svn.freebsd.org/changeset/base/212737 Log: Although flexible BPF timestamping framework isn't yet merged to stable/8, merge from head r209797,r209845 that fix a possible problem. Modified: stable/8/sys/netinet/ipfw/ip_fw_log.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_log.c Thu Sep 16 15:00:43 2010 (r212736) +++ stable/8/sys/netinet/ipfw/ip_fw_log.c Thu Sep 16 15:07:12 2010 (r212737) @@ -152,22 +152,17 @@ ipfw_log(struct ip_fw *f, u_int hlen, st if (V_fw_verbose == 0) { #ifndef WITHOUT_BPF - struct m_hdr mh; if (log_if == NULL || log_if->if_bpf == NULL) return; - /* BPF treats the "mbuf" as read-only */ - mh.mh_next = m; - mh.mh_len = ETHER_HDR_LEN; - if (args->eh) { /* layer2, use orig hdr */ - mh.mh_data = (char *)args->eh; - } else { - /* add fake header. Later we will store - * more info in the header + + if (args->eh) /* layer2, use orig hdr */ + BPF_MTAP2(log_if, args->eh, ETHER_HDR_LEN, m); + else + /* Add fake header. Later we will store + * more info in the header. */ - mh.mh_data = "DDDDDDSSSSSS\x08\x00"; - } - BPF_MTAP(log_if, (struct mbuf *)&mh); + BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); #endif /* !WITHOUT_BPF */ return; }