From owner-svn-src-all@FreeBSD.ORG Mon Feb 2 11:02:20 2009 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 30A0C106566C; Mon, 2 Feb 2009 11:02:20 +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 1F3E38FC17; Mon, 2 Feb 2009 11:02:20 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12B2Kog095426; Mon, 2 Feb 2009 11:02:20 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12B2KVd095425; Mon, 2 Feb 2009 11:02:20 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200902021102.n12B2KVd095425@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 2 Feb 2009 11:02:19 +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: r188005 - head/sbin/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: Mon, 02 Feb 2009 11:02:20 -0000 Author: luigi Date: Mon Feb 2 11:02:19 2009 New Revision: 188005 URL: http://svn.freebsd.org/changeset/base/188005 Log: Explain that we assume AF_INET and only use the addr and port field from a struct sockaddr_in, so there is no need to initialize sin_len Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Feb 2 10:58:05 2009 (r188004) +++ head/sbin/ipfw/ipfw2.c Mon Feb 2 11:02:19 2009 (r188005) @@ -2733,7 +2733,10 @@ chkarg: action->opcode = O_FORWARD_IP; action->len = F_INSN_SIZE(ipfw_insn_sa); - p->sa.sin_len = sizeof(struct sockaddr_in); + /* + * In the kernel we assume AF_INET and use only + * sin_port and sin_addr. + */ p->sa.sin_family = AF_INET; p->sa.sin_port = 0; /*