netfilter: nft_meta: skip EAGAIN if nft_meta_bridge is not a module
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 17 Jul 2019 19:48:32 +0000 (21:48 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 18 Jul 2019 18:55:54 +0000 (20:55 +0200)
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 <pablo@netfilter.org>
net/netfilter/nft_meta.c

index 76866f77e3435d86d88d220e1b33c87cdcd95a4a..865888933a833737d4282b56f11ca84dd504c581 100644 (file)
@@ -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