aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-01-10 05:53:43 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:17 -0500
commit760f2d0186225f06d46e07232d65219c5055cad3 (patch)
tree56096a88e003753434c135d22ffab8f4f9904bc6 /net/ipv6/icmp.c
parent89918fc270bb77cb1a0703f0ea566a692b32e324 (diff)
[NETNS][IPV6]: Make multiple instance of sysctl tables.
Each network namespace wants its own set of sysctl value, eg. we should not be able from a namespace to set a sysctl value for another namespace , especially for the initial network namespace. This patch duplicates the sysctl table when we register a new network namespace for ipv6. The duplicated table are postfixed with the "template" word to notify the developper the table is cloned. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index c3bbd8687307..dfe3b37c43e9 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -907,7 +907,7 @@ int icmpv6_err_convert(int type, int code, int *err)
907EXPORT_SYMBOL(icmpv6_err_convert); 907EXPORT_SYMBOL(icmpv6_err_convert);
908 908
909#ifdef CONFIG_SYSCTL 909#ifdef CONFIG_SYSCTL
910ctl_table ipv6_icmp_table[] = { 910ctl_table ipv6_icmp_table_template[] = {
911 { 911 {
912 .ctl_name = NET_IPV6_ICMP_RATELIMIT, 912 .ctl_name = NET_IPV6_ICMP_RATELIMIT,
913 .procname = "ratelimit", 913 .procname = "ratelimit",
@@ -918,5 +918,15 @@ ctl_table ipv6_icmp_table[] = {
918 }, 918 },
919 { .ctl_name = 0 }, 919 { .ctl_name = 0 },
920}; 920};
921
922struct ctl_table *ipv6_icmp_sysctl_init(struct net *net)
923{
924 struct ctl_table *table;
925
926 table = kmemdup(ipv6_icmp_table_template,
927 sizeof(ipv6_icmp_table_template),
928 GFP_KERNEL);
929 return table;
930}
921#endif 931#endif
922 932