All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Fisher <brad@info-link.net>
To: Patrick McHardy <kaber@trash.net>
Cc: Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>,
	fabrice@netfilter.org
Subject: Re: Time match in mangle/POSTROUTING?
Date: Tue, 02 Dec 2003 18:55:17 -0600	[thread overview]
Message-ID: <3FCD3475.D4D0A063@info-link.net> (raw)
In-Reply-To: 3FCD3306.50603@trash.net

Thanks for the input :)  I'll take a look at this and will send a patch if I
can get it working.  BTW:  is there an easy way in the kernel to determine
whether DST is in effect or not?  I've noticed that the time match always seems
to be based off standard time.  I'm not very familiar with the internals of the
kernel...

-Brad

Patrick McHardy wrote:

> Patrick McHardy wrote:
>
> > POSTROUTING packets don't neccessarily have a timestamp since packets are
> > stamped when they are received which doesn't happen for locally generated
> > traffic. In the source I can see an option "kerneltime" which uses
> > gettimeofday, this should work fine in any chain. The patch does work in
> > OUTPUT, it uses kerneltime automatically then (and also unneccesarrily
> > in FORWARD). A correct fix would require using kerneltime in OUTPUT
> > and POSTROUTING and the skb stamp otherwise.
>
> Even better, in POSTROUTING only use the kerneltime when the skb stamp
> is unset, that way you save expensive gettimeofday calls for forwarded
> packets.
> To make it clean, just remove the kerneltime option completely and only
> look if the stamp is set or unset.
>
> >
> > Best regards,
> > Patrick
> >
> >
> >
> > Brad Fisher wrote:
> >
> >> I'm curious why the time match doesn't work in POSTROUTING?  I have an
> >> application where it would be helpful to use it as such and was
> >> wondering if there was a good technical reason why it shouldn't work.
> >> If I modified the source to allow it to be added to the POSTROUTING
> >> chain, would it work as expected?  I'm assuming it won't be as simple as
> >> that...
> >>
> >> -Brad
> >>
> >>
> >

  reply	other threads:[~2003-12-03  0:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03  0:13 Time match in mangle/POSTROUTING? Brad Fisher
2003-12-03  0:37 ` Patrick McHardy
2003-12-03  0:49   ` Patrick McHardy
2003-12-03  0:55     ` Brad Fisher [this message]
2003-12-03  1:16       ` Patrick McHardy
2003-12-03 20:10       ` [PATCH] " Brad Fisher
2003-12-03  8:07 ` Henrik Nordstrom

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=3FCD3475.D4D0A063@info-link.net \
    --to=brad@info-link.net \
    --cc=fabrice@netfilter.org \
    --cc=kaber@trash.net \
    --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.