Commit 033eab53 authored by Máté Eckl's avatar Máté Eckl Committed by Pablo Neira Ayuso

netfilter: nft_tproxy: Add missing config check

A config check was missing form the code when using
nf_defrag_ipv6_enable with NFT_TPROXY != n and NF_DEFRAG_IPV6 = n and
this caused the following error:

../net/netfilter/nft_tproxy.c: In function 'nft_tproxy_init':
../net/netfilter/nft_tproxy.c:237:3: error: implicit declaration of function
+'nf_defrag_ipv6_enable' [-Werror=implicit-function-declaration]
   err = nf_defrag_ipv6_enable(ctx->net);

This patch adds a check for NF_TABLES_IPV6 when NF_DEFRAG_IPV6 is
selected by Kconfig.
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Fixes: 4ed8eb65 ("netfilter: nf_tables: Add native tproxy support")
Signed-off-by: default avatarMáté Eckl <ecklm94@gmail.com>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c7530326
......@@ -234,9 +234,11 @@ static int nft_tproxy_init(const struct nft_ctx *ctx,
err = nf_defrag_ipv4_enable(ctx->net);
if (err)
return err;
#if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
err = nf_defrag_ipv6_enable(ctx->net);
if (err)
return err;
#endif
break;
default:
return -EOPNOTSUPP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment