Subject: Re: patch: tunnels not setting inputdev

From: Patrick McHardy <[email-masked]>
Date: Sat, 01 Jan 2005 17:10:47 +0100

jamal wrote:

>>For the remaining changes, why not simply set
>>input_dev in netif_receive_skb before the call to ing_filter ?
> 
> You want to be able to filter on indev at ingress - it is safer for
> whoever calls netif_rx() to do the setting. The packet could be looped
> from egress multiple times as well (redirected).

Currently input_dev is set in eth_type_trans, ppp_generic and the
mirred action. With your patch we have a couple of drivers more,
but this still leaves lots of non-ethernet drivers that don't set
input_dev. A centralized solutions seems much better to me than
adding this to every single driver. I can't see the problem with
redirected packets, just set skb->input_dev = skb->dev in
netif_receive_skb, this should have exactly the same effect as
setting it in the drivers or the mirred action.

Regards
Patrick