public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Bind to protocol with AF_PACKET doesn't work for outgoing packets
@ 2001-11-01  9:11 Joris van Rantwijk
  2001-11-02  2:26 ` Edgar Toernig
  0 siblings, 1 reply; 12+ messages in thread
From: Joris van Rantwijk @ 2001-11-01  9:11 UTC (permalink / raw)
  To: linux-kernel

Hello.

I'm trying to see outgoing network packets through the AF_PACKET
interface. This works as long as I bind the packet socket with
sll_protocol==htons(ETH_P_ALL).  I would expect that I can filter
on IP packets by binding to sll_protocol==htons(ETH_P_IP), but when
I try it I suddenly see only the incoming packets and no outgoing at all.

I suspect this is because dev_queue_xmit_nit() only walks the ptype_all
chain (with the ETH_P_ALL taps) and doesn't process the ptype_base[]
lists. net_rx_action() processes ptype_all as well as ptype_base, so
it works fine for incoming packets.

So... Shouldn't dev_queue_xmit_nit() also process ptype_base then ?
Or is this just complete cluelessness on my part ?
(I'm rather new to this so I don't know how it's supposed to work)

I tried this with linux-2.4.12, but it seems relevant to 2.2.x
and 2.0.x as well.

Thanks,
  Joris van Rantwijk
joris@deadlock.et.tudelft.nl - http://deadlock.et.tudelft.nl/~joris/


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-11-02  2:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.21.0111010944050.16656-100000@deadlock.et.tudelft.nl.suse.lists.linux.kernel>
2001-11-01 14:30 ` Bind to protocol with AF_PACKET doesn't work for outgoing packets Andi Kleen
2001-11-01 15:18   ` Joris van Rantwijk
2001-11-01 16:46     ` Andi Kleen
2001-11-01 17:33   ` kuznet
2001-11-01 17:45     ` Andi Kleen
2001-11-01 18:09       ` kuznet
2001-11-01 18:21         ` Andi Kleen
2001-11-01 18:56           ` kuznet
2001-11-01 19:28             ` Andi Kleen
2001-11-01 19:48               ` kuznet
2001-11-01  9:11 Joris van Rantwijk
2001-11-02  2:26 ` Edgar Toernig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox