From owner-svn-src-user@FreeBSD.ORG  Thu Jan  7 12:06:33 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41691106566B;
	Thu,  7 Jan 2010 12:06:33 +0000 (UTC)
	(envelope-from luigi@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3109E8FC12;
	Thu,  7 Jan 2010 12:06:33 +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 o07C6XHx045406;
	Thu, 7 Jan 2010 12:06:33 GMT (envelope-from luigi@svn.freebsd.org)
Received: (from luigi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07C6Xq1045403;
	Thu, 7 Jan 2010 12:06:33 GMT (envelope-from luigi@svn.freebsd.org)
Message-Id: <201001071206.o07C6Xq1045403@svn.freebsd.org>
From: Luigi Rizzo <luigi@FreeBSD.org>
Date: Thu, 7 Jan 2010 12:06:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201741 - user/luigi/ipfw3-head/sys/netinet/ipfw
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jan 2010 12:06:33 -0000

Author: luigi
Date: Thu Jan  7 12:06:32 2010
New Revision: 201741
URL: http://svn.freebsd.org/changeset/base/201741

Log:
  some patches from HEAD

Modified:
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c

Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c
==============================================================================
--- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c	Thu Jan  7 12:00:54 2010	(r201740)
+++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c	Thu Jan  7 12:06:32 2010	(r201741)
@@ -104,7 +104,8 @@ ipfw_check_hook(void *arg, struct mbuf *
 	int ret;
 
 	/* all the processing now uses ip_len in net format */
-	SET_NET_IPLEN(mtod(*m0, struct ip *));
+	if (mtod(*m0, struct ip *)->ip_v == 4)
+		SET_NET_IPLEN(mtod(*m0, struct ip *));
 
 	/* convert dir to IPFW values */
 	dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT;
@@ -236,7 +237,7 @@ again:
 			FREE_PKT(*m0);
 		*m0 = NULL;
 	}
-	if (*m0)
+	if (*m0 && mtod(*m0, struct ip *)->ip_v == 4)
 		SET_HOST_IPLEN(mtod(*m0, struct ip *));
 	return ret;
 }

Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c
==============================================================================
--- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c	Thu Jan  7 12:00:54 2010	(r201740)
+++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c	Thu Jan  7 12:06:32 2010	(r201741)
@@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
 #include <net/vnet.h>
 
 #include <netinet/in.h>
-#include <netinet/ip_var.h>	/* hooks */
+#include <netinet/ip_var.h> /* hooks */
 #include <netinet/ip_fw.h>
 #include <netinet/ipfw/ip_fw_private.h>