[<prev] [next>] [day] [month] [year] [list]
Message-ID: <97949e3e0704231203k7a70905xa81f57c47f3132@mail.gmail.com>
Date: Mon, 23 Apr 2007 12:03:30 -0700
From: "Laurent Chavey" <chavey@...gle.com>
To: "Chris Leech" <chris.leech@...il.com>
Cc: "David Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: AF_PACKET how to get the original netdev from a packet received from a bonded master
Thank you for the pointer, I am looking at the patch ad
see if it help. In my case, that will do the trick, but as mentioned
by Dave it may not have its place in a general distro.
Perso I would rather "cloning" <-- do not flame me, it is not my intent to
open a long thread :-)
the skb received on the bond and pass the clone + original skb
to the tap. This gives a "symetrical" behavior to the tap...
Some of the point made for LLDP etc... may not require this
patch if one adds the processing as a protocol.
Thank you.
On 4/18/07, Chris Leech <chris.leech@...il.com> wrote:
> On 4/18/07, David Miller <davem@...emloft.net> wrote:
> > From: "Laurent Chavey" <chavey@...gle.com>
> > Date: Wed, 18 Apr 2007 16:05:27 -0700
> >
> > > When using PF_PACKET socket with bonded interfaces, there is no
> > > way to get the slave interface (physical interface) the packet was
> > > actually received on.
> >
> > That's right.
> >
> > There isn't a real good solution to this problem either.
> > Decapsulation can happen to arbitrary levels, how many
> > devices should we remember and how to do the reference
> > counting on that correctly?
> >
> > As such, I don't think this will ever be provided.
>
> PJ Waskiewicz posted a patch that introduced a new socket option for
> PF_PACKET sockets to return the orig_dev->ifindex instead of
> dev->ifindex in sockaddr_ll. He posted the patch on March 8th.
>
> http://marc.info/?l=linux-kernel&m=117340678318939&w=2
>
> He also re-posted it on March 19th, at which point you (Dave) told him
> that it was in your backlog and he didn't need to keep resending it.
>
> To me it's seem like a decent opt-in solution for applications that
> might care, without changing existing behavior. Laurent, would that
> change help you? Dave, is there a reason you can see why this
> wouldn't work?
>
> - Chris
>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists