All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Fisher <brad@info-link.net>
To: Krzysztof Oledzki <olenf@ans.pl>
Cc: netfilter-devel@lists.netfilter.org,
	Samuel Jean <sj-netfilter@cookinglinux.org>
Subject: Re: ipt_time fixes (resend, sorry)
Date: Thu, 20 Jan 2005 10:35:46 -0600	[thread overview]
Message-ID: <41EFDDE2.8030901@info-link.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0501201424140.5089@bizon.gios.gov.pl>

Krzysztof Oledzki wrote:

>>
>> Sorry for the additional spam :(
>>
>> The check should be changed to something like the following:
>>
>> +      if (info->date_start <= info->date_stop) {
>> +              /* normal order: start <= stop */
>> +              if ((skb->stamp.tv_sec < info->date_start) || 
>> (skb->stamp.tv_sec > info->date_stop))
>> +                        return 0;
>> +        } else {
>> +              /* reversed order: stop < start */
>> +                if ((skb->stamp.tv_sec < info->date_start) && 
>> (skb->stamp.tv_sec > info->date_stop))
>> +                        return 0;
>> +        }
>>
>> Sorry about the previous crap :)  Anyway, this only adds one more if 
>> test per packet, which in my opintion is acceptable when the 
>> alternative is an additional rule.
>
>
>
> OK.. You need to match 20:00-4:00, right? So why you just cannot 
> reverse the match of 4:00-20:00?
>
> Best regards,
>
>                 Krzysztof Olędzki
>
20:00 - 4:00 is very different from 4:00 - 20:00, one is a range of 8 
hours (20,21,22,23,0,1,2,3), the other is a range of 16 
(4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)...  They are complementary 
to each other in terms of a 24 hour clock.

To match 20:00 - 4:00 you currently need 2 rules:
  1) match 20:00 - 23:59
  2) match 0:00 - 4:00
What I'm proposing is to allow this to be reduced to one rule.

-Brad Fisher

  reply	other threads:[~2005-01-20 16:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-14 14:04 ipt_time fixes (resend, sorry) Krzysztof Oledzki
2005-01-14 14:37 ` Bill Rugolsky Jr.
2005-01-14 14:48   ` Krzysztof Oledzki
2005-01-14 15:32     ` Samuel Jean
2005-01-14 15:24       ` Krzysztof Oledzki
2005-01-14 16:27         ` Brad Fisher
2005-01-14 16:35           ` Brad Fisher
2005-01-20 13:40             ` Krzysztof Oledzki
2005-01-20 16:35               ` Brad Fisher [this message]
2005-01-20 17:18                 ` Krzysztof Oledzki
2005-01-20 18:33                   ` Samuel Jean
2005-01-20 18:45                     ` Brad Fisher
2005-01-20 22:54                     ` Krzysztof Oledzki
2005-01-21  0:23                       ` Samuel Jean
2005-02-01 12:06         ` Harald Welte
2005-02-01 16:52           ` Krzysztof Oledzki
2005-02-15  0:57             ` Harald Welte
2005-04-05  8:18           ` Krzysztof Oledzki
2005-04-10 20:26             ` Harald Welte
2005-04-12 18:45               ` Krzysztof Oledzki
2005-01-14 22:47       ` Samuel Jean
     [not found] ` <200502030010.47260.fabrice.marie@fma-rms.com>
     [not found]   ` <Pine.LNX.4.62.0502150219100.17929@bizon.gios.gov.pl>
2005-02-15 15:23     ` Fabrice MARIE
2005-02-15 15:58       ` Krzysztof Oledzki
2005-02-16 15:24         ` Fabrice MARIE

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=41EFDDE2.8030901@info-link.net \
    --to=brad@info-link.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=olenf@ans.pl \
    --cc=sj-netfilter@cookinglinux.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.