All of lore.kernel.org
 help / color / mirror / Atom feed
* ctnetlink unique id size?
@ 2005-02-17 17:41 Marcus Sundberg
  2005-02-20  4:47 ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Marcus Sundberg @ 2005-02-17 17:41 UTC (permalink / raw)
  To: netfilter-devel

Hi,

isn't an unsigned int a bit (or rather about 32 bits) small for
keeping the id field of the ip_conntrack struct? It's bound to wrap
around, and with things like long-lived ssh sessions it's even
possible for two connections to be assigned the same id after a
wrap-around.

Am I missing something obvious when I think ctnetlink_dump_table()
will break down when the wrap-around occurs?

Using an uint64_t would on the other hand guarantee that each
connection really get a unique id.

//Marcus
-- 
---------------------------------------+--------------------------
   Marcus Sundberg <marcus@ingate.com>  | Firewalls with SIP & NAT
  Software Developer, Ingate Systems AB |  http://www.ingate.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ctnetlink unique id size?
  2005-02-17 17:41 ctnetlink unique id size? Marcus Sundberg
@ 2005-02-20  4:47 ` Patrick McHardy
  2005-02-20 12:28   ` Harald Welte
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2005-02-20  4:47 UTC (permalink / raw)
  To: Marcus Sundberg; +Cc: Harald Welte, netfilter-devel

Marcus Sundberg wrote:
> Hi,
> 
> isn't an unsigned int a bit (or rather about 32 bits) small for
> keeping the id field of the ip_conntrack struct? It's bound to wrap
> around, and with things like long-lived ssh sessions it's even
> possible for two connections to be assigned the same id after a
> wrap-around.
> 
> Am I missing something obvious when I think ctnetlink_dump_table()
> will break down when the wrap-around occurs?
> 
> Using an uint64_t would on the other hand guarantee that each
> connection really get a unique id.

We had a long discussion about this an the result was that it has to
be 64 bit. Search the archives if you are interested, the subject
is "ctnetlink questions". I'm surprised too that it now is 32 bit.
Maybe Harald knows the reason.

Regards
Patrick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ctnetlink unique id size?
  2005-02-20  4:47 ` Patrick McHardy
@ 2005-02-20 12:28   ` Harald Welte
  0 siblings, 0 replies; 3+ messages in thread
From: Harald Welte @ 2005-02-20 12:28 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel, Marcus Sundberg

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

On Sun, Feb 20, 2005 at 05:47:26AM +0100, Patrick McHardy wrote:
> Marcus Sundberg wrote:
> >Hi,
> >
> >isn't an unsigned int a bit (or rather about 32 bits) small for
> >keeping the id field of the ip_conntrack struct? It's bound to wrap
> >around, and with things like long-lived ssh sessions it's even
> >possible for two connections to be assigned the same id after a
> >wrap-around.
> >
> >Am I missing something obvious when I think ctnetlink_dump_table()
> >will break down when the wrap-around occurs?
> >
> >Using an uint64_t would on the other hand guarantee that each
> >connection really get a unique id.
> 
> We had a long discussion about this an the result was that it has to
> be 64 bit. Search the archives if you are interested, the subject
> is "ctnetlink questions". I'm surprised too that it now is 32 bit.
> Maybe Harald knows the reason.

my guess is that nobody has ever increased it's size since that
discussion was over.

> Regards
> Patrick

-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-20 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-17 17:41 ctnetlink unique id size? Marcus Sundberg
2005-02-20  4:47 ` Patrick McHardy
2005-02-20 12:28   ` Harald Welte

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.