From owner-svn-src-all@FreeBSD.ORG Thu Jan 7 09:28:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3DD5106566C; Thu, 7 Jan 2010 09:28:17 +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 939708FC15; Thu, 7 Jan 2010 09:28:17 +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 o079SHqZ007079; Thu, 7 Jan 2010 09:28:17 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o079SHKU007077; Thu, 7 Jan 2010 09:28:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001070928.o079SHKU007077@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 09:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201722 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 09:28:17 -0000 Author: luigi Date: Thu Jan 7 09:28:17 2010 New Revision: 201722 URL: http://svn.freebsd.org/changeset/base/201722 Log: put ip_len in correct order for ip_output(). This prevents a panic when ipfw generates packets on its own (such as reject or keepalives for dynamic rules). Reported by: Chagin Dmitry Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jan 7 09:21:13 2010 (r201721) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jan 7 09:28:17 2010 (r201722) @@ -1002,7 +1002,8 @@ ipfw_send_pkt(struct mbuf *replyto, stru h->ip_hl = sizeof(*h) >> 2; h->ip_tos = IPTOS_LOWDELAY; h->ip_off = 0; - h->ip_len = htons(len); + /* ip_len must be in host format for ip_output */ + h->ip_len = len; h->ip_ttl = V_ip_defttl; h->ip_sum = 0; break;