From owner-svn-src-all@freebsd.org Fri May 20 15:00:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A79EFB42FDD; Fri, 20 May 2016 15:00:13 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 752BA11D7; Fri, 20 May 2016 15:00:13 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4KF0CfK037145; Fri, 20 May 2016 15:00:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4KF0Cri037144; Fri, 20 May 2016 15:00:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201605201500.u4KF0Cri037144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 20 May 2016 15:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300302 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 20 May 2016 15:00:13 -0000 Author: ae Date: Fri May 20 15:00:12 2016 New Revision: 300302 URL: https://svnweb.freebsd.org/changeset/base/300302 Log: Fix the regression introduced in r300143. When we are creating new dynamic state use MATCH_FORWARD direction to correctly initialize protocol's state. Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Fri May 20 14:36:49 2016 (r300301) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Fri May 20 15:00:12 2016 (r300302) @@ -687,7 +687,7 @@ ipfw_install_state(struct ip_fw_chain *c ipfw_insn_limit *cmd, struct ip_fw_args *args, uint32_t tablearg) { ipfw_dyn_rule *q; - int i, dir; + int i; DEB(print_dyn_rule(&args->f_id, cmd->o.opcode, "install_state", "");) @@ -695,7 +695,7 @@ ipfw_install_state(struct ip_fw_chain *c IPFW_BUCK_LOCK(i); - q = lookup_dyn_rule_locked(&args->f_id, i, &dir, NULL); + q = lookup_dyn_rule_locked(&args->f_id, i, NULL, NULL); if (q != NULL) { /* should never occur */ DEB( if (last_log != time_uptime) { @@ -816,7 +816,7 @@ ipfw_install_state(struct ip_fw_chain *c return (1); /* Notify caller about failure */ } - dyn_update_proto_state(q, &args->f_id, NULL, dir); + dyn_update_proto_state(q, &args->f_id, NULL, MATCH_FORWARD); IPFW_BUCK_UNLOCK(i); return (0); }