aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-04-26 16:02:04 +0200
committerPatrick McHardy <kaber@trash.net>2010-04-26 16:02:04 +0200
commit3d0c9c4eb2dbdcc461be4084abd87a9a9e70f713 (patch)
tree3a71a67a1f40afd7afbe0389259eb27d23fbfa36 /net/ipv4
parent8c52d509e84bbf26cffb8b6e75b399689af67885 (diff)
downloadkernel_samsung_aries-3d0c9c4eb2dbdcc461be4084abd87a9a9e70f713.zip
kernel_samsung_aries-3d0c9c4eb2dbdcc461be4084abd87a9a9e70f713.tar.gz
kernel_samsung_aries-3d0c9c4eb2dbdcc461be4084abd87a9a9e70f713.tar.bz2
net: fib_rules: mark arguments to fib_rules_register const and __net_initdata
fib_rules_register() duplicates the template passed to it without modification, mark the argument as const. Additionally the templates are only needed when instantiating a new namespace, so mark them as __net_initdata, which means they can be discarded when CONFIG_NET_NS=n. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fib_rules.c2
-rw-r--r--net/ipv4/ipmr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 3ec84fe..8ab62a5 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -245,7 +245,7 @@ static void fib4_rule_flush_cache(struct fib_rules_ops *ops)
rt_cache_flush(ops->fro_net, -1);
}
-static struct fib_rules_ops fib4_rules_ops_template = {
+static const struct fib_rules_ops __net_initdata fib4_rules_ops_template = {
.family = FIB_RULES_IPV4,
.rule_size = sizeof(struct fib4_rule),
.addr_size = sizeof(u32),
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index a2df501..7d3e382 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -216,7 +216,7 @@ static int ipmr_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
return 0;
}
-static struct fib_rules_ops ipmr_rules_ops_template = {
+static const struct fib_rules_ops __net_initdata ipmr_rules_ops_template = {
.family = FIB_RULES_IPMR,
.rule_size = sizeof(struct ipmr_rule),
.addr_size = sizeof(u32),