lkml.org 
[lkml]   [2019]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 01/79] netfilter: nf_flow_table: set default timeout after successful insertion
    Date
    From: Pablo Neira Ayuso <pablo@netfilter.org>

    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 <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    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);

    \
     
     \ /
      Last update: 2019-09-20 00:12    [W:4.291 / U:0.340 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site