Re: PF_PACKET, ETH_P_IP does not catch outgoing packets.

kuznet@ms2.inr.ac.ru
Thu, 23 Dec 1999 20:41:11 +0300 (MSK)


Hello!

> do not receive outgoing packets. Just changing the
> protocol to ETH_P_ALL (or a later bind with that proto)
> will get all packets. Is this intentional? (I don't think
> so *g*)

Yes, sort of. It is planned flaw in design. 8)

> Any idea for a quick fix?

No, it is not very easy. If it were easy, it would be made. 8)

The problem is that bound to protocol sockets are not
checked at output at all, only ETH_P_ALL ones are checked.
We could check all, but it affects performance, because
true protocols (looking exactly as packet socket) really
need not it. The direction of compromise is not evident.

Someone promised to think on this and repair at the end of 2.1,
I even reserved sockopt PACKET_RECV_OUTPUT to switch it on/off,
but, alas, I did not receive any patches.

Alexey

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/