From: Pablo Neira Ayuso Date: Wed, 17 Jul 2019 19:48:32 +0000 (+0200) Subject: netfilter: nft_meta: skip EAGAIN if nft_meta_bridge is not a module X-Git-Tag: v5.3-rc2~42^2~19^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78e21eb699203f32f8c524b01fb7363125cf9d68;p=thirdparty%2Fkernel%2Flinux.git netfilter: nft_meta: skip EAGAIN if nft_meta_bridge is not a module If it is a module, request this module. Otherwise, if it is compiled built-in or not selected, skip this. Fixes: 0ef1efd1354d ("netfilter: nf_tables: force module load in case select_ops() returns -EAGAIN") Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nft_meta.c b/net/netfilter/nft_meta.c index 76866f77e3435..865888933a833 100644 --- a/net/netfilter/nft_meta.c +++ b/net/netfilter/nft_meta.c @@ -546,7 +546,7 @@ nft_meta_select_ops(const struct nft_ctx *ctx, if (tb[NFTA_META_DREG] && tb[NFTA_META_SREG]) return ERR_PTR(-EINVAL); -#ifdef CONFIG_NF_TABLES_BRIDGE +#if defined(CONFIG_NF_TABLES_BRIDGE) && IS_MODULE(CONFIG_NFT_BRIDGE_META) if (ctx->family == NFPROTO_BRIDGE) return ERR_PTR(-EAGAIN); #endif