From: Patrick McHardy <kaber@trash.net>
To: hadi@cyberus.ca
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@oss.sgi.com, Wichert Akkerman <wichert@wiggy.net>
Subject: Re: patch: tunnels not setting inputdev
Date: Sun, 02 Jan 2005 01:24:08 +0100 [thread overview]
Message-ID: <41D73F28.3090206@trash.net> (raw)
In-Reply-To: <1104622406.1049.450.camel@jzny.localdomain>
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
next prev parent reply other threads:[~2005-01-02 0:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-31 17:16 patch: tunnels not setting inputdev jamal
2004-12-31 18:02 ` Patrick McHardy
2004-12-31 20:11 ` jamal
2005-01-01 16:10 ` Patrick McHardy
2005-01-01 23:33 ` jamal
2005-01-02 0:24 ` Patrick McHardy [this message]
2005-01-03 14:46 ` jamal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41D73F28.3090206@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=netdev@oss.sgi.com \
--cc=wichert@wiggy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).