Re: [PATCH 02/13] IP set core support

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

 



On Tue, 25 Jan 2011, Jozsef Kadlecsik wrote:

> On Tue, 25 Jan 2011, Patrick McHardy wrote:
> 
> > On 21.01.2011 15:01, Jozsef Kadlecsik wrote:
> > > +/* Flags at command level */
> > > +enum ipset_cmd_flags {
> > > +	IPSET_FLAG_BIT_EXIST	= 0,
> > > +	IPSET_FLAG_EXIST	= (1 << IPSET_FLAG_BIT_EXIST),
> > > +};
> > 
> > One more comment regarding this file - this duplicates the semantic
> > of the NLM_F_EXCL flag, which indicates that an error should be
> > returned if something already exists on creation.
> 
> It is exactly the NLM_F_EXCL flag, just a shorthand notation for the core:
> 
> static inline u32
> flag_exist(const struct nlmsghdr *nlh)
> {
>         return nlh->nlmsg_flags & NLM_F_EXCL ? 0 : IPSET_FLAG_EXIST;
> }

I would better leave it as is: it is an open part of ipset to pass 
command-level flags down to the sets. Currently only the IPSET_FLAG_EXIST 
flag is defined and special in the sense that it express the NLM_F_EXCL 
flag.

Best regards,
Jozsef
-
E-mail  : kadlec@xxxxxxxxxxxxxxxxx, kadlec@xxxxxxxxxxxx
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary
--
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