Skip to content

Commit

Permalink
ifb: fix building without CONFIG_NET_CLS_ACT
Browse files Browse the repository at this point in the history
The driver no longer depends on this option, but it fails to
build if it's disabled because the skb->tc_skip_classify is
hidden behind an #ifdef:

drivers/net/ifb.c:81:8: error: no member named 'tc_skip_classify' in 'struct sk_buff'
                skb->tc_skip_classify = 1;

Use the same #ifdef around the assignment.

Fixes: 046178e ("ifb: Depend on netfilter alternatively to tc")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnd Bergmann authored and David S. Miller committed Oct 29, 2021
1 parent bb5dbf2 commit 7444d70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ static void ifb_ri_tasklet(struct tasklet_struct *t)
while ((skb = __skb_dequeue(&txp->tq)) != NULL) {
/* Skip tc and netfilter to prevent redirection loop. */
skb->redirected = 0;
#ifdef CONFIG_NET_CLS_ACT
skb->tc_skip_classify = 1;
#endif
nf_skip_egress(skb, true);

u64_stats_update_begin(&txp->tsync);
Expand Down

0 comments on commit 7444d70

Please sign in to comment.