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>
This commit is contained in:
Jan Engelhardt
2009-08-24 14:56:30 +02:00
committed by Patrick McHardy
parent dc05a564ab
commit 35aad0ffdf
22 changed files with 42 additions and 37 deletions

View File

@@ -2100,7 +2100,8 @@ do_ip6t_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
return ret;
}
struct xt_table *ip6t_register_table(struct net *net, struct xt_table *table,
struct xt_table *ip6t_register_table(struct net *net,
const struct xt_table *table,
const struct ip6t_replace *repl)
{
int ret;

View File

@@ -51,7 +51,7 @@ static struct
.term = IP6T_ERROR_INIT, /* ERROR */
};
static struct xt_table packet_filter = {
static const struct xt_table packet_filter = {
.name = "filter",
.valid_hooks = FILTER_VALID_HOOKS,
.me = THIS_MODULE,

View File

@@ -21,7 +21,7 @@ MODULE_DESCRIPTION("ip6tables mangle table");
(1 << NF_INET_LOCAL_OUT) | \
(1 << NF_INET_POST_ROUTING))
static struct
static const struct
{
struct ip6t_replace repl;
struct ip6t_standard entries[5];
@@ -57,7 +57,7 @@ static struct
.term = IP6T_ERROR_INIT, /* ERROR */
};
static struct xt_table packet_mangler = {
static const struct xt_table packet_mangler = {
.name = "mangle",
.valid_hooks = MANGLE_VALID_HOOKS,
.me = THIS_MODULE,

View File

@@ -8,7 +8,7 @@
#define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT))
static struct
static const struct
{
struct ip6t_replace repl;
struct ip6t_standard entries[2];
@@ -35,7 +35,7 @@ static struct
.term = IP6T_ERROR_INIT, /* ERROR */
};
static struct xt_table packet_raw = {
static const struct xt_table packet_raw = {
.name = "raw",
.valid_hooks = RAW_VALID_HOOKS,
.me = THIS_MODULE,

View File

@@ -26,7 +26,7 @@ MODULE_DESCRIPTION("ip6tables security table, for MAC rules");
(1 << NF_INET_FORWARD) | \
(1 << NF_INET_LOCAL_OUT)
static struct
static const struct
{
struct ip6t_replace repl;
struct ip6t_standard entries[3];
@@ -56,7 +56,7 @@ static struct
.term = IP6T_ERROR_INIT, /* ERROR */
};
static struct xt_table security_table = {
static const struct xt_table security_table = {
.name = "security",
.valid_hooks = SECURITY_VALID_HOOKS,
.me = THIS_MODULE,