linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: nft_fwd_netdev: Fix CONFIG_NET_CLS_ACT=n build
@ 2020-04-10 14:26 Geert Uytterhoeven
  2020-04-10 14:31 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-04-10 14:26 UTC (permalink / raw)
  To: Joerg Roedel, Krzysztof Kozlowski, Matthias Brugger
  Cc: Geert Uytterhoeven, iommu, linux-mediatek, linux-kernel,
	linux-arm-kernel

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: noreply@ellerman.id.au
Fixes: bcfabee1afd99484 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 net/netfilter/nft_fwd_netdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/nft_fwd_netdev.c b/net/netfilter/nft_fwd_netdev.c
index 74f050ba6badc9dc..ebcaf5c325712f30 100644
--- a/net/netfilter/nft_fwd_netdev.c
+++ b/net/netfilter/nft_fwd_netdev.c
@@ -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;
-- 
2.17.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netfilter: nft_fwd_netdev: Fix CONFIG_NET_CLS_ACT=n build
  2020-04-10 14:26 [PATCH] netfilter: nft_fwd_netdev: Fix CONFIG_NET_CLS_ACT=n build Geert Uytterhoeven
@ 2020-04-10 14:31 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-04-10 14:31 UTC (permalink / raw)
  To: Joerg Roedel, Krzysztof Kozlowski, Matthias Brugger
  Cc: Linux IOMMU, linux-mediatek, Linux Kernel Mailing List, Linux ARM

On Fri, Apr 10, 2020 at 4:26 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 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: noreply@ellerman.id.au
> Fixes: bcfabee1afd99484 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Please ignore, wrong patch.
Sorry for the mess.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-10 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10 14:26 [PATCH] netfilter: nft_fwd_netdev: Fix CONFIG_NET_CLS_ACT=n build Geert Uytterhoeven
2020-04-10 14:31 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).