From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 17:46:13 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 1759F106566B; Thu, 1 Jul 2010 17:46:13 +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 06BAA8FC16; Thu, 1 Jul 2010 17:46:13 +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 o61HkC6j039773; Thu, 1 Jul 2010 17:46:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61HkCr4039771; Thu, 1 Jul 2010 17:46:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007011746.o61HkCr4039771@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 1 Jul 2010 17:46:12 +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: r209633 - head/sys/netgraph 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, 01 Jul 2010 17:46:13 -0000 Author: glebius Date: Thu Jul 1 17:46:12 2010 New Revision: 209633 URL: http://svn.freebsd.org/changeset/base/209633 Log: The struct ipfw_rule_ref follows the struct m_tag. Deal with this correctly. This fixes breakage of ng_ipfw(4) in r201527. Submitted by: Alexander Zagrebin Modified: head/sys/netgraph/ng_ipfw.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Thu Jul 1 17:44:33 2010 (r209632) +++ head/sys/netgraph/ng_ipfw.c Thu Jul 1 17:46:12 2010 (r209633) @@ -221,20 +221,21 @@ ng_ipfw_findhook1(node_p node, u_int16_t static int ng_ipfw_rcvdata(hook_p hook, item_p item) { - struct ipfw_rule_ref *tag; + struct m_tag *tag; + struct ipfw_rule_ref *r; struct mbuf *m; NGI_GET_M(item, m); NG_FREE_ITEM(item); - tag = (struct ipfw_rule_ref *) - m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); + tag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); if (tag == NULL) { NG_FREE_M(m); return (EINVAL); /* XXX: find smth better */ }; - if (tag->info & IPFW_INFO_IN) { + r = (struct ipfw_rule_ref *)(tag + 1); + if (r->info & IPFW_INFO_IN) { ip_input(m); return (0); } else {