[PATCH] net: bridge: fix static key check

Martin Kaiser posted 1 patch 1 week, 4 days ago
net/bridge/br_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] net: bridge: fix static key check
Posted by Martin Kaiser 1 week, 4 days ago
Fix the check if netfilter's static keys are available. netfilter defines
and exports static keys if CONFIG_JUMP_LABEL is enabled. (HAVE_JUMP_LABEL
is never defined.)

Fixes: 971502d77faa ("bridge: netfilter: unroll NF_HOOK helper in bridge input path")
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 net/bridge/br_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index e355a15bf5ab..1405f1061a54 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -274,7 +274,7 @@ static int nf_hook_bridge_pre(struct sk_buff *skb, struct sk_buff **pskb)
 	int ret;
 
 	net = dev_net(skb->dev);
-#ifdef HAVE_JUMP_LABEL
+#ifdef CONFIG_JUMP_LABEL
 	if (!static_key_false(&nf_hooks_needed[NFPROTO_BRIDGE][NF_BR_PRE_ROUTING]))
 		goto frame_finish;
 #endif
-- 
2.43.7
Re: [PATCH] net: bridge: fix static key check
Posted by Nikolay Aleksandrov 1 week, 2 days ago
On 27/01/2026 12:19, Martin Kaiser wrote:
> Fix the check if netfilter's static keys are available. netfilter defines
> and exports static keys if CONFIG_JUMP_LABEL is enabled. (HAVE_JUMP_LABEL
> is never defined.)
> 
> Fixes: 971502d77faa ("bridge: netfilter: unroll NF_HOOK helper in bridge input path")
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   net/bridge/br_input.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index e355a15bf5ab..1405f1061a54 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -274,7 +274,7 @@ static int nf_hook_bridge_pre(struct sk_buff *skb, struct sk_buff **pskb)
>   	int ret;
>   
>   	net = dev_net(skb->dev);
> -#ifdef HAVE_JUMP_LABEL
> +#ifdef CONFIG_JUMP_LABEL
>   	if (!static_key_false(&nf_hooks_needed[NFPROTO_BRIDGE][NF_BR_PRE_ROUTING]))
>   		goto frame_finish;
>   #endif

Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Re: [PATCH] net: bridge: fix static key check
Posted by Florian Westphal 1 week, 4 days ago
Martin Kaiser <martin@kaiser.cx> wrote:
> Fix the check if netfilter's static keys are available. netfilter defines
> and exports static keys if CONFIG_JUMP_LABEL is enabled. (HAVE_JUMP_LABEL
> is never defined.)
> 
> Fixes: 971502d77faa ("bridge: netfilter: unroll NF_HOOK helper in bridge input path")

Reviewed-by: Florian Westphal <fw@strlen.de>

@net maintainers: feel free to take this directly.