Skip to content

Commit

Permalink
netfilter: nf_flow_table: set default timeout after successful insertion
Browse files Browse the repository at this point in the history
Set up the default timeout for this new entry otherwise the garbage
collector might quickly remove it right after the flowtable insertion.

Fixes: ac2a666 ("netfilter: add generic flow table infrastructure")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
ummakynes committed Sep 3, 2019
1 parent b067fa0 commit 110e487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_flow_table_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ int flow_offload_add(struct nf_flowtable *flow_table, struct flow_offload *flow)
return err;
}

flow->timeout = (u32)jiffies;
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
return 0;
}
EXPORT_SYMBOL_GPL(flow_offload_add);
Expand Down

0 comments on commit 110e487

Please sign in to comment.