Skip to content

Commit 1135285

Browse files
Florian Westphalgregkh
authored andcommitted
netfilter: nf_tables: use net_generic infra for transaction data
[ 0854db2 ] This moves all nf_tables pernet data from struct net to a net_generic extension, with the exception of the gencursor. The latter is used in the data path and also outside of the nf_tables core. All others are only used from the configuration plane. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d59ed9d commit 1135285

File tree

6 files changed

+245
-147
lines changed

6 files changed

+245
-147
lines changed

include/net/netfilter/nf_tables.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,4 +1472,14 @@ void nf_tables_trans_destroy_flush_work(void);
14721472
int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result);
14731473
__be64 nf_jiffies64_to_msecs(u64 input);
14741474

1475+
struct nftables_pernet {
1476+
struct list_head tables;
1477+
struct list_head commit_list;
1478+
struct list_head module_list;
1479+
struct list_head notify_list;
1480+
struct mutex commit_mutex;
1481+
unsigned int base_seq;
1482+
u8 validate_state;
1483+
};
1484+
14751485
#endif /* _NET_NF_TABLES_H */

include/net/netns/nftables.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
#include <linux/list.h>
66

77
struct netns_nftables {
8-
struct list_head tables;
9-
struct list_head commit_list;
10-
struct list_head module_list;
11-
struct mutex commit_mutex;
12-
unsigned int base_seq;
138
u8 gencursor;
14-
u8 validate_state;
159
};
1610

1711
#endif

0 commit comments

Comments
 (0)