This is one of the very few external callers of ->get_timeouts(),

We can use a fixed timeout instead, conntrack core will refresh this in
case a new packet comes within this period.

Use of ESTABLISHED timeout seems way too huge anyway.

Signed-off-by: Florian Westphal <f...@strlen.de>
---
 net/netfilter/nf_flow_table_core.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/net/netfilter/nf_flow_table_core.c 
b/net/netfilter/nf_flow_table_core.c
index eb0d1658ac05..9140b3cc16e2 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -110,8 +110,6 @@ static void flow_offload_fixup_tcp(struct ip_ct_tcp *tcp)
 static void flow_offload_fixup_ct_state(struct nf_conn *ct)
 {
        const struct nf_conntrack_l4proto *l4proto;
-       struct net *net = nf_ct_net(ct);
-       unsigned int *timeouts;
        unsigned int timeout;
        int l4num;
 
@@ -123,14 +121,10 @@ static void flow_offload_fixup_ct_state(struct nf_conn 
*ct)
        if (!l4proto)
                return;
 
-       timeouts = l4proto->get_timeouts(net);
-       if (!timeouts)
-               return;
-
        if (l4num == IPPROTO_TCP)
-               timeout = timeouts[TCP_CONNTRACK_ESTABLISHED];
+               timeout = 2 * 60 * HZ;
        else if (l4num == IPPROTO_UDP)
-               timeout = timeouts[UDP_CT_REPLIED];
+               timeout = 30 * HZ;
        else
                return;
 
-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to