aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netfilter/x_tables.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 9657c4ee70fc..e305f2d0d4d1 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -269,9 +269,12 @@ struct xt_table_info
269 unsigned int underflow[NF_INET_NUMHOOKS]; 269 unsigned int underflow[NF_INET_NUMHOOKS];
270 270
271 /* ipt_entry tables: one per CPU */ 271 /* ipt_entry tables: one per CPU */
272 char *entries[NR_CPUS]; 272 /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */
273 char *entries[1];
273}; 274};
274 275
276#define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \
277 + nr_cpu_ids * sizeof(char *))
275extern int xt_register_target(struct xt_target *target); 278extern int xt_register_target(struct xt_target *target);
276extern void xt_unregister_target(struct xt_target *target); 279extern void xt_unregister_target(struct xt_target *target);
277extern int xt_register_targets(struct xt_target *target, unsigned int n); 280extern int xt_register_targets(struct xt_target *target, unsigned int n);