logo       

Re: packet socket can't steal packets: msg#00012

Subject: Re: packet socket can't steal packets
On Tue, 7 May 2002, Dmitrii Tisnek wrote:

> hey, I've been trying to change certain network packet mangling software
> such that it would not need a kernel module, and it seems to me that,
> unfortunately there's no way to make packet socket "steal" packets it
> deliveres to the user mode.
> 
> The behaviour I see is it gives userland a copy and give the native
> network stack a copy.

right - take a look at net/core/dev.c netif_receive_skb.

> unless I missed something, perhaps there could be an ioctl/setsockopt
> which would turn this behaviour into "pass packet to user mode or drop
> altogether" that would never result in network stack getting a packet
> directly.

well, that would be nice for certain applications, but wouldn't it
also be a security problem?

... well there would be a way how you could implement this kind of
feature now, but you need to write a module also :(

        ++dent

-- 
in some way i do, and in some way i don't.




<Prev in Thread] Current Thread [Next in Thread>