jamal wrote:
I want to understand the repurcasssions instead of blindly setting. Let
users complain, thats why the printk exists. For example what does
input_dev mean for netbios or a 802.3ad interface? You already saw one,
xfrm, where there was no need to reset.
What's special about netbios ? For 802.3ad, I would expect input_dev
to hold the virtual device through which the packet entered the stack,
just what iptables -i would match. For xfrm - there is no need but its
also not wrong.
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.
in some cases the pointers are swapped. You cant just blindly
set skb->input_dev = skb->dev at the input - that would be violating the
intent; think reinjecting packets (and look at mirred as a sample of
apps to come that do this).
I don't know your intent, but I assumed it was to match the incoming
interface as the networking stack sees it. Why would the pointers be
swapped ? Please give me an example. mirred does:
skb2->dev = dev;
skb2->input_dev = skb->dev;
So on input input_dev is the incoming interface of the original packet,
on output it is the outgoing interface of the original packet. Doesn't
make much sense to me, the original packet came the same way both times.
Regards
Patrick
|