From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB873C49ED7 for ; Thu, 19 Sep 2019 22:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 918C021928 for ; Thu, 19 Sep 2019 22:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931119; bh=JQQVKiSnaCmnV1xUm/kINyEfc9GQ5GGAKeWbjaUCzsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ytSNIoQDGnkcMvBP+5LrhS36i5F1w7AqCxa6JcmCT95bJ6PZB3Dez0UfPSU689SeN aSafAegkx541PKLwZEmkCbaXq2NqTxySRd1heJC7owXu4qEiDMQXdaByaGwyiuc6U8 p0ZVz9vUccE1/oXnRMS1CGYdqKjQZjJTHTHnCgPA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405893AbfISWL4 (ORCPT ); Thu, 19 Sep 2019 18:11:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:50730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390037AbfISWLz (ORCPT ); Thu, 19 Sep 2019 18:11:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDC1421907; Thu, 19 Sep 2019 22:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931115; bh=JQQVKiSnaCmnV1xUm/kINyEfc9GQ5GGAKeWbjaUCzsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c1u8Y+Z9cN3hF9r5DeaxA/thbN/PXwMnla+2zoZ0TukZy3w0UJDW1990WGXvZXujK ZaCM44Xyhtgi2ibVFb+ScXianyCkM6M412d0E1GK52NhN9chAlLM4Zg0NRqORZSzF/ ZUVGo5RFuIW6mDUAPn56fcaBHh9TerN1AIjn6Oco= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 4.19 01/79] netfilter: nf_flow_table: set default timeout after successful insertion Date: Fri, 20 Sep 2019 00:02:46 +0200 Message-Id: <20190919214807.735209930@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214807.612593061@linuxfoundation.org> References: <20190919214807.612593061@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Pablo Neira Ayuso commit 110e48725db6262f260f10727d0fb2d3d25895e4 upstream. Set up the default timeout for this new entry otherwise the garbage collector might quickly remove it right after the flowtable insertion. Fixes: ac2a66665e23 ("netfilter: add generic flow table infrastructure") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_flow_table_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c @@ -203,7 +203,7 @@ int flow_offload_add(struct nf_flowtable return err; } - flow->timeout = (u32)jiffies; + flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT; return 0; } EXPORT_SYMBOL_GPL(flow_offload_add);