Subject: Re: [PATCH 1/7] netns ebtables: part 1

From: Patrick McHardy <[email-masked]>
Date: Thu, 16 Oct 2008 15:12:03 +0200

Alexey Dobriyan wrote:
> One needs to add ".netns_ok = 1" to igmp_protocol to test all of this
> with ebtables() in netns.
> -------------------------------------------------
> [PATCH 1/7] netns ebtables: part 1
> 
> * make list of ebt_tables per-netns
> * propagate netns from userspace, register table in passed netns
> * temporarily register every ebt_table in init_net

I'm not queuing patches for 2.6.29 yet, please resend the entire
batch once Dave opens his net-next tree again.

> --- a/include/net/netns/x_tables.h
> +++ b/include/net/netns/x_tables.h
> @@ -6,5 +6,6 @@
>  
>  struct netns_xt {
>  	struct list_head tables[NPROTO];
> +	struct list_head ebt_tables;

This could just use tables[NFPROTO_BRIDGE].

BTW, I have a patch queued to change NPROTO to NFPROTO_NUMPROTO in
struct netns_xt since we've decoupled the netfilter values from
generic procotol values (attached in case you would like to add
an ACK).

commit c985d88e7ae4f45d50cca80033429c7270a8c185
Author: Patrick McHardy <[email-masked]>
Date:   Thu Oct 16 13:14:26 2008 +0200

    netfilter: netns: use NFPROTO_NUMPROTO instead of NUMPROTO for tables array
    
    The netfilter families have been decoupled from regular protocol families.
    
    Signed-off-by: Patrick McHardy <[email-masked]>

diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h
index 0cb63ed..b809397 100644
--- a/include/net/netns/x_tables.h
+++ b/include/net/netns/x_tables.h
@@ -2,9 +2,9 @@
 #define __NETNS_X_TABLES_H
 
 #include <linux/list.h>
-#include <linux/net.h>
+#include <linux/netfilter.h>
 
 struct netns_xt {
-	struct list_head tables[NPROTO];
+	struct list_head tables[NFPROTO_NUMPROTO];
 };
 #endif