netfilter: nft_fwd_netdev: Fix CONFIG_NET_CLS_ACT=n build
Subsystems (3)
PATCH 1/1 netfilter: nft_fwd_netdev: Fix CONFIG_NET_CLS_ACT=n build
If CONFIG_NET_CLS_ACT=n:
net/netfilter/nft_fwd_netdev.c: In function ‘nft_fwd_netdev_eval’:
net/netfilter/nft_fwd_netdev.c:32:10: error: ‘struct sk_buff’ has no member named ‘tc_redirected’
pkt->skb->tc_redirected = 1;
^~
net/netfilter/nft_fwd_netdev.c:33:10: error: ‘struct sk_buff’ has no member named ‘tc_from_ingress’
pkt->skb->tc_from_ingress = 1;
^~Fix this by protecting this code hunk with the appropriate #ifdef.
Reported-by [email protected]
Fixes bcfabee1afd99484 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress")
Signed-off-by Geert Uytterhoeven <[email protected]>
--- net/netfilter/nft_fwd_netdev.c | 2 ++ 1 file changed, 2 insertions(+)
net/netfilter/nft_fwd_netdev.c +2 -0
@@ -28,9 +28,11 @@ static void nft_fwd_netdev_eval(const struct nft_expr *expr,struct nft_fwd_netdev *priv =nft_expr_priv (expr);int oif = regs->data[priv->sreg_dev]; +#ifdef CONFIG_NET_CLS_ACT /* These are used by ifb only. */ pkt->skb->tc_redirected =1 ; pkt->skb->tc_from_ingress =1 ; +#endif nf_fwd_netdev_egress (pkt, oif); regs->verdict.code =NF_STOLEN ;
Signature · 1 line
2.17.1
Quoted 10 lines · Geert Uytterhoeven
If
CONFIG_NET_CLS_ACT=n:net/netfilter/nft_fwd_netdev.c: In function ‘nft_fwd_netdev_eval’: net/netfilter/nft_fwd_netdev.c:32:10: error: ‘struct sk_buff’ has no member named ‘tc_redirected’ pkt->skb->tc_redirected = 1; ^~ net/netfilter/nft_fwd_netdev.c:33:10: error: ‘struct sk_buff’ has no member named ‘tc_from_ingress’ pkt->skb->tc_from_ingress = 1; ^~
Quoted 5 lines
Fix this by protecting this code hunk with the appropriate #ifdef.
Reported-by [email protected]Fixes bcfabee1afd99484 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress")Signed-off-by Geert Uytterhoeven <[email protected]>
Please ignore, wrong patch.
Sorry for the mess.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds