Re: [PATCH 1/2 nf-next] netfilter: nf_tables: Introduce stateful object update operation

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

 



Fernando Fernandez Mancera <ffmancera@xxxxxxxxxx> wrote:
> How is that argument going to be used? If 'commit' is false we should
> just check that values are fine but not update them?

Yes, thats the idea.

> Yes, I agree on updating the object in the commit phase. But I am not
> sure about how I should place it on 'trans'. Any hints? Thanks :-)

Can you place a pointer to the tb array on the trans object?

Another possibility is to have ->update return a kmalloced blob
that contains ready-to-use binary data, so depending on the 'bool
commit' the update hook would expect either tb[] (for validation)
or a backend-maintained struct with the to-update values.

In the quota case it would be a struct containing the u64 values.

> I am also writing some userspace shell tests.

Thats good, thanks Fernando!



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux