All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Marco Innocenti <m.innocenti@cineca.it>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] NETFILTER: add support for invert condition (!) in	ipt_limit
Date: Mon, 17 Oct 2005 17:15:07 +0200	[thread overview]
Message-ID: <4353BFFB.7070406@trash.net> (raw)
In-Reply-To: <20051017143053.GA29010@pc-innocenti.cineca.it>

Marco Innocenti wrote:
> On Mon, Oct 17, 2005 at 06:45:47PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> 
>>>-		return 1;
>>>+		return 1 ^ r->invert;
>>
>>!r->invert
> 
> 
> I've seen it in ipt_multiport.c and I copied it.
> Should ipt_multiport.c be corrected?

Probably, I've never liked these strange looking expressions.

> diff -uprN linux-2.6.13.4/include/linux/netfilter_ipv4/ipt_limit.h linux-2.6.13.4.mio/include/linux/netfilter_ipv4/ipt_limit.h
> --- linux-2.6.13.4/include/linux/netfilter_ipv4/ipt_limit.h	2005-10-10 20:54:29.000000000 +0200
> +++ linux-2.6.13.4.mio/include/linux/netfilter_ipv4/ipt_limit.h	2005-10-15 16:25:02.000000000 +0200
> @@ -9,6 +9,7 @@
>  struct ipt_rateinfo {
>  	u_int32_t avg;    /* Average secs between packets * scale */
>  	u_int32_t burst;  /* Period multiplier for upper limit. */
> +	u_int8_t invert;
>  
>  	/* Used internally by the kernel */
>  	unsigned long prev;

This breaks userspace compatibility, you need to use a new revision
if you want to change this structure. Look at ipt_MARK for an example.

  reply	other threads:[~2005-10-17 15:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17  9:44 [PATCH] NETFILTER: add support for invert condition (!) in ipt_limit Marco Innocenti
2005-10-17  9:45 ` YOSHIFUJI Hideaki / 吉藤英明
2005-10-17 14:10   ` Marco Innocenti
2005-10-17 14:30   ` Marco Innocenti
2005-10-17 15:15     ` Patrick McHardy [this message]
2005-10-17 15:28       ` Phil Oester
2005-10-17 15:43         ` Patrick McHardy
2005-10-17 21:35       ` Sven Schuster
2005-10-18  8:33         ` Henrik Nordstrom
2005-10-18  9:19           ` Sven Schuster
2005-10-18  9:57             ` Henrik Nordstrom
2005-10-30 15:12         ` Patrick McHardy
2005-10-20  9:01       ` Marco Innocenti
2005-11-21 14:27         ` m.innocenti
2005-11-21 14:38           ` Pablo Neira
  -- strict thread matches above, loose matches on Subject: below --
2005-10-17  9:34 Marco Innocenti

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=4353BFFB.7070406@trash.net \
    --to=kaber@trash.net \
    --cc=m.innocenti@cineca.it \
    --cc=netfilter-devel@lists.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.