All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [PATCH 13/13] "set" match and "SET" target support
Date: Tue, 25 Jan 2011 22:40:16 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.00.1101252234440.19648@blackhole.kfki.hu> (raw)
In-Reply-To: <4D3EE9C4.3020804@trash.net>

On Tue, 25 Jan 2011, Patrick McHardy wrote:

> > +/* Backward compatibility constrains (incomplete):
> > + *  2.6.24: [NETLINK]: Introduce nested and byteorder flag to netlink attribute
> > + *  2.6.25: is_vmalloc_addr(): Check if an address is within the vmalloc
> > + *	    boundaries
> > + *  2.6.27: rcu: split list.h and move rcu-protected lists into rculist.h
> > + *  2.6.28: netfilter: ctnetlink: remove bogus module dependency between
> > + *	    ctnetlink and nf_nat (nfnl_lock/nfnl_unlock)
> > + *  2.6.29: generic swap(): introduce global macro swap(a, b)
> > + *  2.6.31: netfilter: passive OS fingerprint xtables match
> > + *  2.6.34: rcu: Add lockdep-enabled variants of rcu_dereference()
> 
> These are just implementation details about what changed in previous
> versions and don't really matter for the current kernel version.
> I think this comment can be removed.

Yes.
 
> > + */
> > +
> > +#define	CHECK_OK	0
> > +#define CHECK_FAIL	(-EINVAL)
> 
> This is not making the code easier to read, its a common convention
> to return 0 for no error and errno codes otherwise.

It's there because actually, in the git tree that's a full macro 
condition:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
#define CHECK_OK        1
#define CHECK_FAIL      0
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) */
#define CHECK_OK        0
#define CHECK_FAIL      (-EINVAL)
#endif

I can search/replace it, of course.
 
> > +	if (info->add_set.u.flags[IPSET_DIM_MAX-1] != 0 ||
> > +	    info->del_set.u.flags[IPSET_DIM_MAX-1] != 0) {
> > +		pr_warning("That's nasty!\n");
> 
> This message doesn't seem very helpful. Assuming a structure
> mismatch and no mischief, it would be better to print something
> the user can understand.

Cryptic messages from the old age, inherited through many version, 
survived many changes. I'll mourn it :-)).

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
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

  reply	other threads:[~2011-01-25 21:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 14:01 [PATCH 00/13] ipset kernel patches v2 Jozsef Kadlecsik
2011-01-21 14:01 ` [PATCH 01/13] NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros Jozsef Kadlecsik
2011-01-21 14:01   ` [PATCH 02/13] IP set core support Jozsef Kadlecsik
2011-01-21 14:01     ` [PATCH 03/13] bitmap:ip set type support Jozsef Kadlecsik
2011-01-21 14:01       ` [PATCH 04/13] bitmap:ip,mac " Jozsef Kadlecsik
2011-01-21 14:01         ` [PATCH 05/13] bitmap:port set " Jozsef Kadlecsik
2011-01-21 14:01           ` [PATCH 06/13] hash:ip " Jozsef Kadlecsik
2011-01-21 14:02             ` [PATCH 07/13] hash:ip,port " Jozsef Kadlecsik
2011-01-21 14:02               ` [PATCH 08/13] hash:ip,port,ip " Jozsef Kadlecsik
2011-01-21 14:02                 ` [PATCH 09/13] hash:ip,port,net " Jozsef Kadlecsik
2011-01-21 14:02                   ` [PATCH 10/13] hash:net " Jozsef Kadlecsik
2011-01-21 14:02                     ` [PATCH 11/13] hash:net,port " Jozsef Kadlecsik
2011-01-21 14:02                       ` [PATCH 12/13] list:set " Jozsef Kadlecsik
2011-01-21 14:02                         ` [PATCH 13/13] "set" match and "SET" target support Jozsef Kadlecsik
2011-01-25 15:18                           ` Patrick McHardy
2011-01-25 21:40                             ` Jozsef Kadlecsik [this message]
2011-01-25 15:05       ` [PATCH 03/13] bitmap:ip set type support Patrick McHardy
2011-01-25 21:34         ` Jozsef Kadlecsik
2011-01-27  9:06           ` Jozsef Kadlecsik
2011-01-27  9:08             ` Patrick McHardy
2011-01-21 21:39     ` [PATCH 02/13] IP set core support Jozsef Kadlecsik
2011-01-25 14:47       ` Patrick McHardy
2011-01-25 21:23         ` Jozsef Kadlecsik
2011-01-26 11:57           ` Patrick McHardy
2011-01-26 11:57           ` Patrick McHardy
2011-01-25 15:06     ` Patrick McHardy
2011-01-25 21:28       ` Jozsef Kadlecsik
2011-01-27  8:58         ` Jozsef Kadlecsik
2011-01-25 15:38 ` [PATCH 00/13] ipset kernel patches v2 Patrick McHardy
2011-01-25 21:41   ` Jozsef Kadlecsik
2011-01-31 22:52 [PATCH 00/13] ipset kernel patches v3 Jozsef Kadlecsik
2011-01-31 22:52 ` [PATCH 01/13] NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros Jozsef Kadlecsik
2011-01-31 22:52   ` [PATCH 02/13] IP set core support Jozsef Kadlecsik
2011-01-31 22:52     ` [PATCH 03/13] bitmap:ip set type support Jozsef Kadlecsik
2011-01-31 22:52       ` [PATCH 04/13] bitmap:ip,mac " Jozsef Kadlecsik
2011-01-31 22:53         ` [PATCH 05/13] bitmap:port set " Jozsef Kadlecsik
2011-01-31 22:53           ` [PATCH 06/13] hash:ip " Jozsef Kadlecsik
2011-01-31 22:53             ` [PATCH 07/13] hash:ip,port " Jozsef Kadlecsik
2011-01-31 22:53               ` [PATCH 08/13] hash:ip,port,ip " Jozsef Kadlecsik
2011-01-31 22:53                 ` [PATCH 09/13] hash:ip,port,net " Jozsef Kadlecsik
2011-01-31 22:53                   ` [PATCH 10/13] hash:net " Jozsef Kadlecsik
2011-01-31 22:53                     ` [PATCH 11/13] hash:net,port " Jozsef Kadlecsik
2011-01-31 22:53                       ` [PATCH 12/13] list:set " Jozsef Kadlecsik
2011-01-31 22:53                         ` [PATCH 13/13] "set" match and "SET" target support Jozsef Kadlecsik
2011-02-01 14:56                           ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1101252234440.19648@blackhole.kfki.hu \
    --to=kadlec@blackhole.kfki.hu \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.