Skip to content

Commit 033eab5

Browse files
ecklmummakynes
authored andcommitted
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: Randy Dunlap <[email protected]> Fixes: 4ed8eb6 ("netfilter: nf_tables: Add native tproxy support") Signed-off-by: Máté Eckl <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent c753032 commit 033eab5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/netfilter/nft_tproxy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ static int nft_tproxy_init(const struct nft_ctx *ctx,
234234
err = nf_defrag_ipv4_enable(ctx->net);
235235
if (err)
236236
return err;
237+
#if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
237238
err = nf_defrag_ipv6_enable(ctx->net);
238239
if (err)
239240
return err;
241+
#endif
240242
break;
241243
default:
242244
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)