Nikolay Borisov reported that the detection is broken. Fix checking in the
right sctructure and wrap the call to dev_get_by_index_rcu() too.
AC_MSG_CHECKING([kernel source for struct net in struct tcf_ematch])
if test -f $ksourcedir/include/net/pkt_cls.h && \
- $AWK '/^struct tcf_ematch_ops / {for(i=1; i<=7; i++) {getline; print}}' $ksourcedir/include/net/pkt_cls.h | \
+ $AWK '/^struct tcf_ematch / {for(i=1; i<=7; i++) {getline; print}}' $ksourcedir/include/net/pkt_cls.h | \
$GREP -q 'struct net'; then
AC_MSG_RESULT(yes)
AC_SUBST(HAVE_TCF_EMATCH_STRUCT_NET, define)
rcu_read_lock();
if (skb->skb_iif)
+#ifdef HAVE_TCF_EMATCH_STRUCT_NET
indev = dev_get_by_index_rcu(em->net, skb->skb_iif);
+#else
+ indev = dev_get_by_index_rcu(dev_net(dev), skb->skb_iif);
+#endif
acpar.in = indev ? indev : dev;
acpar.out = dev;