diff options
author | Florian Westphal <fw@strlen.de> | 2021-05-28 13:30:06 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-05-29 02:04:54 +0300 |
commit | 2d7b4ace0754ebaaf71c6824880178d46aa0ab33 (patch) | |
tree | 3de213adfe22128bbdc8f4e089c1b7e4bcd2ebcf /net/netfilter/nft_synproxy.c | |
parent | 85554eb981e5a8b0b8947611193aef1737081ef2 (diff) | |
download | linux-2d7b4ace0754ebaaf71c6824880178d46aa0ab33.tar.xz |
netfilter: nf_tables: add and use nft_thoff helper
This allows to change storage placement later on without changing readers.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_synproxy.c')
-rw-r--r-- | net/netfilter/nft_synproxy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_synproxy.c b/net/netfilter/nft_synproxy.c index 4fda8b3f1762..a0109fa1e92d 100644 --- a/net/netfilter/nft_synproxy.c +++ b/net/netfilter/nft_synproxy.c @@ -109,7 +109,7 @@ static void nft_synproxy_do_eval(const struct nft_synproxy *priv, { struct synproxy_options opts = {}; struct sk_buff *skb = pkt->skb; - int thoff = pkt->xt.thoff; + int thoff = nft_thoff(pkt); const struct tcphdr *tcp; struct tcphdr _tcph; @@ -123,7 +123,7 @@ static void nft_synproxy_do_eval(const struct nft_synproxy *priv, return; } - tcp = skb_header_pointer(skb, pkt->xt.thoff, + tcp = skb_header_pointer(skb, thoff, sizeof(struct tcphdr), &_tcph); if (!tcp) { |