From patchwork Tue Apr 10 12:49:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 151542 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3F164B702A for ; Tue, 10 Apr 2012 22:49:48 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758406Ab2DJMtd (ORCPT ); Tue, 10 Apr 2012 08:49:33 -0400 Received: from mail.us.es ([193.147.175.20]:45007 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758632Ab2DJMt2 (ORCPT ); Tue, 10 Apr 2012 08:49:28 -0400 Received: (qmail 18845 invoked from network); 10 Apr 2012 14:49:27 +0200 Received: from unknown (HELO us.es) (192.168.2.11) by us.es with SMTP; 10 Apr 2012 14:49:27 +0200 Received: (qmail 18558 invoked by uid 507); 10 Apr 2012 12:49:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on antivirus1 X-Spam-Level: X-Spam-Status: No, score=-97.0 required=7.5 tests=BAYES_50,KHOP_DYNAMIC, RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC, USER_IN_WHITELIST autolearn=disabled version=3.3.1 Received: from 127.0.0.1 by antivirus1 (envelope-from , uid 501) with qmail-scanner-2.08 (clamdscan: 0.97.4/14765. Clear:RC:1(127.0.0.1):. Processed in 0.024924 secs); 10 Apr 2012 12:49:22 -0000 Received: from unknown (HELO antivirus1) (127.0.0.1) by us.es with SMTP; 10 Apr 2012 12:49:22 -0000 Received: from 192.168.1.13 (192.168.1.13) by antivirus1 (F-Secure/fsigk_smtp/407/antivirus1); Tue, 10 Apr 2012 14:49:22 +0200 (CEST) X-Virus-Status: clean(F-Secure/fsigk_smtp/407/antivirus1) Received: (qmail 6986 invoked from network); 10 Apr 2012 14:49:21 +0200 Received: from 184.68.221.87.dynamic.jazztel.es (HELO localhost.localdomain) (pneira@us.es@87.221.68.184) by us.es with SMTP; 10 Apr 2012 14:49:21 +0200 From: pablo@netfilter.org To: netfilter-devel@vger.kernel.org Cc: davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH 5/5] netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_net Date: Tue, 10 Apr 2012 14:49:01 +0200 Message-Id: <1334062141-3962-6-git-send-email-pablo@netfilter.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1334062141-3962-1-git-send-email-pablo@netfilter.org> References: <1334062141-3962-1-git-send-email-pablo@netfilter.org> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Gao feng in function nf_conntrack_init_net,when nf_conntrack_timeout_init falied, we should call nf_conntrack_ecache_fini to do rollback. but the current code calls nf_conntrack_timeout_fini. Signed-off-by: Gao feng Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_conntrack_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 3cc4487..729f157 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1592,7 +1592,7 @@ static int nf_conntrack_init_net(struct net *net) return 0; err_timeout: - nf_conntrack_timeout_fini(net); + nf_conntrack_ecache_fini(net); err_ecache: nf_conntrack_tstamp_fini(net); err_tstamp: