Re: [RFC PATCH] netfilter: nf_tables: add new write expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/15/2014 02:17 PM, Nikolay Aleksandrov wrote:
> The new "write" expression can be used to manipulate packet data.
> The parameters that it has are source register (source for the bytes
> which are to be written), offset in the packet and length to write.
> It uses a select_ops method to choose between fast ops in the cases
> length is 1,2 or 4 bytes and slow ops (i.e. using memcpy) in other
> cases.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@xxxxxxxxxx>
> ---
> I needed a way (other than passing the packets to user-space) to alter
> the ToS field via nftables, so I decided to make it a bit more general. I
> use it with the immediate expression to load the new ToS and then write it.
> If you find this useful I can post the libnftnl patch as well.
> Right now as you can see it continues even if the "write" wasn't successful
> which should be probably changed to NFT_BREAK for that case.
> This patch applies to Dave's net-next tree.
> 
And I'll fix the direct skb->data references and some other small issues,
thus the RFC :-)

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux