From ef638a84405c9f6556a9d7c257ccbba74efd228e Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Sat, 14 May 2022 20:15:10 +0200 Subject: [PATCH 10/12] frontends: drop udp_get_timeouts and use standard upstream api Drop udp_get_timeouts and use nf_udp_pernet and ->timeouts instead or relying on a downstream api not present upstream. --- frontends/nss/ecm_nss_ipv4.c | 3 ++- frontends/nss/ecm_nss_ipv6.c | 3 ++- frontends/sfe/ecm_sfe_ipv4.c | 3 ++- frontends/sfe/ecm_sfe_ipv6.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c index 719a747..558819a 100644 --- a/frontends/nss/ecm_nss_ipv4.c +++ b/frontends/nss/ecm_nss_ipv4.c @@ -607,7 +607,8 @@ sync_conntrack: #else timeouts = nf_ct_timeout_lookup(ct); if (!timeouts) { - timeouts = udp_get_timeouts(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + timeouts = un->timeouts; } spin_lock_bh(&ct->lock); diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c index 67ee364..51eb069 100644 --- a/frontends/nss/ecm_nss_ipv6.c +++ b/frontends/nss/ecm_nss_ipv6.c @@ -586,7 +586,8 @@ sync_conntrack: #else timeouts = nf_ct_timeout_lookup(ct); if (!timeouts) { - timeouts = udp_get_timeouts(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + timeouts = un->timeouts; } spin_lock_bh(&ct->lock); diff --git a/frontends/sfe/ecm_sfe_ipv4.c b/frontends/sfe/ecm_sfe_ipv4.c index 3f30821..931af5d 100644 --- a/frontends/sfe/ecm_sfe_ipv4.c +++ b/frontends/sfe/ecm_sfe_ipv4.c @@ -527,7 +527,8 @@ sync_conntrack: #else timeouts = nf_ct_timeout_lookup(ct); if (!timeouts) { - timeouts = udp_get_timeouts(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + timeouts = un->timeouts; } spin_lock_bh(&ct->lock); diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c index 54fdbf3..63d8888 100644 --- a/frontends/sfe/ecm_sfe_ipv6.c +++ b/frontends/sfe/ecm_sfe_ipv6.c @@ -516,7 +516,8 @@ sync_conntrack: #else timeouts = nf_ct_timeout_lookup(ct); if (!timeouts) { - timeouts = udp_get_timeouts(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + timeouts = un->timeouts; } spin_lock_bh(&ct->lock); -- 2.34.1