Re: [PATCH nf-next,v2 1/2] rhashtable: add rhashtable_lookup_get_insert_key()

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

 



On Fri, Aug 26, 2016 at 07:27:36PM +0800, Herbert Xu wrote:
> On Thu, Aug 25, 2016 at 04:41:26PM +0200, Pablo Neira Ayuso wrote:
> > This patch modifies __rhashtable_insert_fast() so it returns the
> > existing object that clashes with the one that you want to insert.
> > In case the object is successfully inserted, NULL is returned.
> > Otherwise, you get an error via ERR_PTR().
> > 
> > This patch adapts the existing callers of __rhashtable_insert_fast()
> > so they handle this new logic, and it adds a new
> > rhashtable_lookup_get_insert_key() interface to fetch this existing
> > object.
> > 
> > nf_tables needs this change to improve handling of EEXIST cases via
> > honoring the NLM_F_EXCL flag and by checking if the data part of the
> > mapping matches what we have.
> > 
> > Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> > Cc: Thomas Graf <tgraf@xxxxxxx>
> > Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
> 
> Acked-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Thanks Herbert!

@David, would you be OK if I get this rhashtable update through
nf-next given that I have a follow up patch that depending on this?
Will be sending a pull request asap so we don't get out of sync.
--
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