[PATCH 4/4] first conntrack ID must be 1 not 2

Jozsef Kadlecsik kadlec at blackhole.kfki.hu
Thu Feb 16 09:47:57 CET 2006


On Thu, 16 Feb 2006, Patrick McHardy wrote:

> Harald Welte wrote:
> > On Mon, Feb 13, 2006 at 03:41:52AM +0100, Pablo Neira Ayuso wrote:
> >
> >>[NF_CONNTRACK] first conntrack ID must be 1 not 2
> >>
> >>The first conntrack ID must be 1. If a new conntrack is created, the
> >>general ID counter must be post-incremented instead pre-incremented
> >>since [ip|nf]_conntrack_next_id is initialized to 1. Same applies for
> >>expectations.
> >
> >
> > looks clean to me.  Interesting question though: Does it matter whether
> > we start with 1 or 2?  Am I missing something?
>
> Its irrelevant since the number doesn't have any meaning beyond beeing
> an identifier. Anyway, I'd prefer a patch that just removes the
> initialization to 1.

Couldn't the id be simply equal to the jiffies when creating the conntrack
entry? (And adding time_after/before when comparing ids, of course.)

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



More information about the netfilter-devel mailing list