All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] Originating device info for Packets trapped on Bridge
@ 2019-06-08  7:41 dhan lin
  0 siblings, 0 replies; only message in thread
From: dhan lin @ 2019-06-08  7:41 UTC (permalink / raw)
  To: bridge

[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]

Hi All,

I've a few doubts w.r.t layer2-frame processing in linux and PACKET_ORIGDEV
socket option for getting origdev info.

For example, lets assume below given is the set of net devices that my
frame is intended to traverse over.

eth0(1) -> bond0(2) -> bridge(3) -> vlan100(4). >>> (x) ifindex for
each netdevice

I have created a  RAW socket ( not binded to any interface) , attached with
a socket filter to trap only interested packets.
I am getting a copy of frame trapped from each of the netdevice. is this
expected?

frame trapped from eth0 will have from.sll_ifindex=1
frame trapped from bond0 will have from.sll_ifindex=2
frame trapped from bridge will have from.sll_ifindex=3
frame trapped from vlan100 will have from.sll_ifindex=4

If I set the following socket option PACKET_ORIGDEV , I get the following
result

frame trapped from eth0 will have from.sll_ifindex=1
frame trapped from bond0 will have from.sll_ifindex=1
frame trapped from bridge will have from.sll_ifindex=3.  >> why is this not
set to 1 or 2?
frame trapped from vlan100 will have from.sll_ifindex=3

can someone help me understand the role played by PACKET_ORIGDEV socket
option in the above scenario.

[-- Attachment #2: Type: text/html, Size: 2805 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-08  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-08  7:41 [Bridge] Originating device info for Packets trapped on Bridge dhan lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.