All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] [PATCH] ctnetlink updates
@ 2005-03-27 23:55 Pablo Neira
  2005-04-01  6:59 ` Harald Welte
  2005-04-03 18:01 ` Patrick McHardy
  0 siblings, 2 replies; 48+ messages in thread
From: Pablo Neira @ 2005-03-27 23:55 UTC (permalink / raw)
  To: Netfilter Development Mailinglist; +Cc: Harald Welte, Patrick McHardy

Hi,

I've ported nfnetlink-ctnetlink to 2.6 ip_conntrack to make the 
transition easier. So my intentions are porting it to nfconntrack once 
it gets pushed forward. My work is done on top of the ct-event-API.

There are some issues I'd like to discuss:

o Declaring ID as unsigned int. I think it's just fine.

	- A conntrack must be identified with one of the tuples (original or 
reply) and its id. That way it can be uniquely identified.

	- Using u_int64_t just reduces the possibility of the wrapping around 
but such possible problem is still there.

o dump_table() has problems once wrapping around happens.

	- The ordered list isn't ordered anymore once id wrapping around 
happens. New conntracks with low id's are inserted at the end. While 
dumping the table, the branch that compares that ct->id <= cb->args[0] 
returns true and those new conntracks aren't dumped.

I've introduced a function that inserts conntrack ordered by id in the 
buckets.

static inline void
list_insert_ordered(struct list_head *head,
                     struct ip_conntrack *ct,
                     enum ip_conntrack_dir dir)
{
         struct list_head *i;
         struct ip_conntrack *cur;

         ASSERT_WRITE_LOCK(head);
         list_for_each(i, head) {
                 cur = (struct ip_conntrack *) i;
                 if (ct->id <= cur->id) {
                         list_add_tail(&ct->tuplehash[dir].list, i);
                         return;
                 }
         }
         list_add_tail(&ct->tuplehash[dir].list, head);
}

--
Pablo

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

end of thread, other threads:[~2005-07-11  9:50 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-27 23:55 [RFC] [PATCH] ctnetlink updates Pablo Neira
2005-04-01  6:59 ` Harald Welte
2005-04-03 18:01 ` Patrick McHardy
2005-04-06 18:08   ` Pablo Neira
2005-04-17 15:07     ` Patrick McHardy
2005-04-29  7:14       ` Jozsef Kadlecsik
2005-04-29  8:02         ` Harald Welte
2005-05-04  9:18           ` [RFC] alternative to conntrack ID Amin Azez
2005-05-04  9:32             ` Patrick Schaaf
2005-05-04 11:30             ` Patrick McHardy
2005-05-04 12:01               ` Amin Azez
2005-05-06 15:16                 ` Patrick McHardy
2005-05-07 20:36                   ` Marcus Sundberg
2005-05-07 22:18                     ` Patrick McHardy
2005-05-07 22:32                       ` Marcus Sundberg
2005-05-09 14:17                         ` KOVACS Krisztian
2005-05-09 15:08                           ` Amin Azez
2005-05-10  6:49                             ` Harald Welte
2005-05-17 16:12                           ` Amin Azez
2005-05-17 20:17                             ` Patrick McHardy
2005-05-18  7:24                               ` Amin Azez
2005-05-18  9:30                               ` Jozsef Kadlecsik
2005-06-04 23:52                                 ` Pablo Neira
2005-06-05  1:02                                   ` Pablo Neira
2005-06-06  8:48                                     ` Jozsef Kadlecsik
2005-06-09 12:52                                       ` Pablo Neira
2005-06-09 13:00                                         ` Pablo Neira
2005-06-09 13:34                                           ` Jozsef Kadlecsik
2005-06-10 10:21                                             ` Pablo Neira
2005-06-13  7:41                                               ` Jozsef Kadlecsik
2005-06-14  2:30                                                 ` Pablo Neira
2005-06-14  2:42                                                   ` Patrick McHardy
2005-06-15  2:41                                                     ` Pablo Neira
2005-06-20 16:04                                                     ` Amin Azez
2005-06-20 16:12                                                       ` Patrick McHardy
2005-06-22  9:09                                                         ` Amin Azez
2005-06-22  9:30                                                           ` Oscar Mechanic
2005-06-22 17:23                                                           ` Patrick McHardy
2005-07-11  5:41                                                             ` Harald Welte
2005-07-11  7:47                                                               ` Patrick McHardy
2005-07-11  9:50                                                                 ` Pablo Neira
2005-06-06  8:17                                   ` Jozsef Kadlecsik
2005-05-18  6:45                             ` Jozsef Kadlecsik
2005-05-18  7:08                               ` Amin Azez
2005-05-18  7:17                                 ` Jozsef Kadlecsik
2005-05-11  8:43                         ` Amin Azez
2005-05-01 23:49         ` [RFC] [PATCH] ctnetlink updates Pablo Neira
2005-05-02 10:47           ` 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.