From owner-svn-src-stable@FreeBSD.ORG Wed Oct 2 12:35:03 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC57E823; Wed, 2 Oct 2013 12:35:03 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D97FA269B; Wed, 2 Oct 2013 12:35:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r92CZ36S045451; Wed, 2 Oct 2013 12:35:03 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r92CZ3Ge045448; Wed, 2 Oct 2013 12:35:03 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201310021235.r92CZ3Ge045448@svn.freebsd.org> From: Philip Paeps Date: Wed, 2 Oct 2013 12:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255987 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 02 Oct 2013 12:35:04 -0000 Author: philip Date: Wed Oct 2 12:35:03 2013 New Revision: 255987 URL: http://svnweb.freebsd.org/changeset/base/255987 Log: MFC r255928: Use the correct EtherType for logging IPv6 packets. Modified: stable/9/sys/netpfil/ipfw/ip_fw_log.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_log.c Wed Oct 2 06:00:34 2013 (r255986) +++ stable/9/sys/netpfil/ipfw/ip_fw_log.c Wed Oct 2 12:35:03 2013 (r255987) @@ -173,11 +173,18 @@ ipfw_log(struct ip_fw *f, u_int hlen, st if (args->eh) /* layer2, use orig hdr */ BPF_MTAP2(log_if, args->eh, ETHER_HDR_LEN, m); - else + else { /* Add fake header. Later we will store * more info in the header. */ - BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); + if (ip->ip_v == 4) + BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); + else if (ip->ip_v == 6) + BPF_MTAP2(log_if, "DDDDDDSSSSSS\x86\xdd", ETHER_HDR_LEN, m); + else + /* Obviously bogus EtherType. */ + BPF_MTAP2(log_if, "DDDDDDSSSSSS\xff\xff", ETHER_HDR_LEN, m); + } #endif /* !WITHOUT_BPF */ return; }