mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
xfrm: fix unused variable warning if CONFIG_NETFILTER=n
After recent change 'x' is only used when CONFIG_NETFILTER is set:
net/ipv4/xfrm4_output.c: In function '__xfrm4_output':
net/ipv4/xfrm4_output.c:19:21: warning: unused variable 'x' [-Wunused-variable]
19 | struct xfrm_state *x = skb_dst(skb)->xfrm;
Expand the CONFIG_NETFILTER scope to avoid this.
Fixes: 2ab6096db2
("xfrm: remove output_finish indirection from xfrm_state_afinfo")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
2ab6096db2
commit
7d4343d501
1 changed files with 1 additions and 1 deletions
|
@ -16,9 +16,9 @@
|
||||||
|
|
||||||
static int __xfrm4_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
static int __xfrm4_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_NETFILTER
|
||||||
struct xfrm_state *x = skb_dst(skb)->xfrm;
|
struct xfrm_state *x = skb_dst(skb)->xfrm;
|
||||||
|
|
||||||
#ifdef CONFIG_NETFILTER
|
|
||||||
if (!x) {
|
if (!x) {
|
||||||
IPCB(skb)->flags |= IPSKB_REROUTED;
|
IPCB(skb)->flags |= IPSKB_REROUTED;
|
||||||
return dst_output(net, sk, skb);
|
return dst_output(net, sk, skb);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue