aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-08-24 08:56:30 -0400
committerPatrick McHardy <kaber@trash.net>2009-08-24 08:56:30 -0400
commit35aad0ffdf548617940ca1e78be1f2e0bafc4496 (patch)
tree1cab1705197cd247a5b5809e768e89f630c8460e /net/netfilter
parentdc05a564ab1b3a1957927da50912964b61f7da69 (diff)
netfilter: xtables: mark initial tables constant
The inputted table is never modified, so should be considered const. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/x_tables.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 025d1a0af78b..a6ac83a93348 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -736,16 +736,17 @@ xt_replace_table(struct xt_table *table,
736} 736}
737EXPORT_SYMBOL_GPL(xt_replace_table); 737EXPORT_SYMBOL_GPL(xt_replace_table);
738 738
739struct xt_table *xt_register_table(struct net *net, struct xt_table *table, 739struct xt_table *xt_register_table(struct net *net,
740 const struct xt_table *input_table,
740 struct xt_table_info *bootstrap, 741 struct xt_table_info *bootstrap,
741 struct xt_table_info *newinfo) 742 struct xt_table_info *newinfo)
742{ 743{
743 int ret; 744 int ret;
744 struct xt_table_info *private; 745 struct xt_table_info *private;
745 struct xt_table *t; 746 struct xt_table *t, *table;
746 747
747 /* Don't add one object to multiple lists. */ 748 /* Don't add one object to multiple lists. */
748 table = kmemdup(table, sizeof(struct xt_table), GFP_KERNEL); 749 table = kmemdup(input_table, sizeof(struct xt_table), GFP_KERNEL);
749 if (!table) { 750 if (!table) {
750 ret = -ENOMEM; 751 ret = -ENOMEM;
751 goto out; 752 goto out;