aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-05-19 16:51:29 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-19 16:51:29 -0400
commit0a64b4b811025ce0386ad84d81504e4ff7985856 (patch)
tree5dd25612ce7b3c1933c823237c34b09a6ba02e9e /net
parentd5a4502e9efa534212484fd691339f6469cf95ff (diff)
inet: Rename fragmentation sysctl-related functions/variables.
The fragments sysctls also contains some, that are to be visible, but read-only in net namespaces. The naming in net/core/sysctl_net_core.c is - tables, that are to be registered in namespaces have a "ns" word in their names. So rename ones in ipv4/ip_fragment.c and ipv6/reassembly.c to fit this. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ip_fragment.c18
-rw-r--r--net/ipv6/reassembly.c18
2 files changed, 18 insertions, 18 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index cd6ce6ac6358..7f102eeb618e 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -598,7 +598,7 @@ int ip_defrag(struct sk_buff *skb, u32 user)
598#ifdef CONFIG_SYSCTL 598#ifdef CONFIG_SYSCTL
599static int zero; 599static int zero;
600 600
601static struct ctl_table ip4_frags_ctl_table[] = { 601static struct ctl_table ip4_frags_ns_ctl_table[] = {
602 { 602 {
603 .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH, 603 .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH,
604 .procname = "ipfrag_high_thresh", 604 .procname = "ipfrag_high_thresh",
@@ -644,14 +644,14 @@ static struct ctl_table ip4_frags_ctl_table[] = {
644 { } 644 { }
645}; 645};
646 646
647static int ip4_frags_ctl_register(struct net *net) 647static int ip4_frags_ns_ctl_register(struct net *net)
648{ 648{
649 struct ctl_table *table; 649 struct ctl_table *table;
650 struct ctl_table_header *hdr; 650 struct ctl_table_header *hdr;
651 651
652 table = ip4_frags_ctl_table; 652 table = ip4_frags_ns_ctl_table;
653 if (net != &init_net) { 653 if (net != &init_net) {
654 table = kmemdup(table, sizeof(ip4_frags_ctl_table), GFP_KERNEL); 654 table = kmemdup(table, sizeof(ip4_frags_ns_ctl_table), GFP_KERNEL);
655 if (table == NULL) 655 if (table == NULL)
656 goto err_alloc; 656 goto err_alloc;
657 657
@@ -676,7 +676,7 @@ err_alloc:
676 return -ENOMEM; 676 return -ENOMEM;
677} 677}
678 678
679static void ip4_frags_ctl_unregister(struct net *net) 679static void ip4_frags_ns_ctl_unregister(struct net *net)
680{ 680{
681 struct ctl_table *table; 681 struct ctl_table *table;
682 682
@@ -685,12 +685,12 @@ static void ip4_frags_ctl_unregister(struct net *net)
685 kfree(table); 685 kfree(table);
686} 686}
687#else 687#else
688static inline int ip4_frags_ctl_register(struct net *net) 688static inline int ip4_frags_ns_ctl_register(struct net *net)
689{ 689{
690 return 0; 690 return 0;
691} 691}
692 692
693static inline void ip4_frags_ctl_unregister(struct net *net) 693static inline void ip4_frags_ns_ctl_unregister(struct net *net)
694{ 694{
695} 695}
696#endif 696#endif
@@ -714,12 +714,12 @@ static int ipv4_frags_init_net(struct net *net)
714 714
715 inet_frags_init_net(&net->ipv4.frags); 715 inet_frags_init_net(&net->ipv4.frags);
716 716
717 return ip4_frags_ctl_register(net); 717 return ip4_frags_ns_ctl_register(net);
718} 718}
719 719
720static void ipv4_frags_exit_net(struct net *net) 720static void ipv4_frags_exit_net(struct net *net)
721{ 721{
722 ip4_frags_ctl_unregister(net); 722 ip4_frags_ns_ctl_unregister(net);
723 inet_frags_exit_net(&net->ipv4.frags, &ip4_frags); 723 inet_frags_exit_net(&net->ipv4.frags, &ip4_frags);
724} 724}
725 725
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 798cabc7535b..7e008de87117 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -632,7 +632,7 @@ static struct inet6_protocol frag_protocol =
632}; 632};
633 633
634#ifdef CONFIG_SYSCTL 634#ifdef CONFIG_SYSCTL
635static struct ctl_table ip6_frags_ctl_table[] = { 635static struct ctl_table ip6_frags_ns_ctl_table[] = {
636 { 636 {
637 .ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH, 637 .ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH,
638 .procname = "ip6frag_high_thresh", 638 .procname = "ip6frag_high_thresh",
@@ -670,14 +670,14 @@ static struct ctl_table ip6_frags_ctl_table[] = {
670 { } 670 { }
671}; 671};
672 672
673static int ip6_frags_sysctl_register(struct net *net) 673static int ip6_frags_ns_sysctl_register(struct net *net)
674{ 674{
675 struct ctl_table *table; 675 struct ctl_table *table;
676 struct ctl_table_header *hdr; 676 struct ctl_table_header *hdr;
677 677
678 table = ip6_frags_ctl_table; 678 table = ip6_frags_ns_ctl_table;
679 if (net != &init_net) { 679 if (net != &init_net) {
680 table = kmemdup(table, sizeof(ip6_frags_ctl_table), GFP_KERNEL); 680 table = kmemdup(table, sizeof(ip6_frags_ns_ctl_table), GFP_KERNEL);
681 if (table == NULL) 681 if (table == NULL)
682 goto err_alloc; 682 goto err_alloc;
683 683
@@ -701,7 +701,7 @@ err_alloc:
701 return -ENOMEM; 701 return -ENOMEM;
702} 702}
703 703
704static void ip6_frags_sysctl_unregister(struct net *net) 704static void ip6_frags_ns_sysctl_unregister(struct net *net)
705{ 705{
706 struct ctl_table *table; 706 struct ctl_table *table;
707 707
@@ -710,12 +710,12 @@ static void ip6_frags_sysctl_unregister(struct net *net)
710 kfree(table); 710 kfree(table);
711} 711}
712#else 712#else
713static inline int ip6_frags_sysctl_register(struct net *net) 713static inline int ip6_frags_ns_sysctl_register(struct net *net)
714{ 714{
715 return 0; 715 return 0;
716} 716}
717 717
718static inline void ip6_frags_sysctl_unregister(struct net *net) 718static inline void ip6_frags_ns_sysctl_unregister(struct net *net)
719{ 719{
720} 720}
721#endif 721#endif
@@ -728,12 +728,12 @@ static int ipv6_frags_init_net(struct net *net)
728 728
729 inet_frags_init_net(&net->ipv6.frags); 729 inet_frags_init_net(&net->ipv6.frags);
730 730
731 return ip6_frags_sysctl_register(net); 731 return ip6_frags_ns_sysctl_register(net);
732} 732}
733 733
734static void ipv6_frags_exit_net(struct net *net) 734static void ipv6_frags_exit_net(struct net *net)
735{ 735{
736 ip6_frags_sysctl_unregister(net); 736 ip6_frags_ns_sysctl_unregister(net);
737 inet_frags_exit_net(&net->ipv6.frags, &ip6_frags); 737 inet_frags_exit_net(&net->ipv6.frags, &ip6_frags);
738} 738}
739 739