Re: Bind to protocol with AF_PACKET doesn't work for outgoing packets

Andi Kleen (ak@suse.de)
Thu, 1 Nov 2001 19:21:53 +0100


On Thu, Nov 01, 2001 at 09:09:07PM +0300, A.N.Kuznetsov wrote:
> > ugly imho; if the feature exists it should be implemented for the full
> > packet functionality which includes binding to protocols.
>
> This is a silly abuse. Sniffers do not bind to protocols, should not
> do this and have no reasons to do this.

When you e.g. have a TCP sniffer it makes sense to only bind it to ETH_P_IP.

If the sll_protocol field is not fully supported it should be removed.

>
>
> > I think the patch should be added.
>
> That which adds all the packet sockets to ptype_all? Do you jest? :-)

Do you worry about the handling of hundreds of packet sockets?

Using the ptype hash before was nice, but does not look like it is absolutely
required. The overhead this way is not much bigger for a reasonable number
of packet sockets (and for a large number the current ptype hash is likely
inadequate anyways)

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