netdev
[Top] [All Lists]

Re: patch: tunnels not setting inputdev

To: hadi@xxxxxxxxxx
Subject: Re: patch: tunnels not setting inputdev
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Sat, 01 Jan 2005 17:10:47 +0100
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Wichert Akkerman <wichert@xxxxxxxxx>
In-reply-to: <1104523892.1047.338.camel@jzny.localdomain>
References: <1104513392.1048.316.camel@jzny.localdomain> <41D5941C.8060001@trash.net> <1104523892.1047.338.camel@jzny.localdomain>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
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

<Prev in Thread] Current Thread [Next in Thread>