aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/sysctl_net_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
-rw-r--r--net/ipv4/sysctl_net_ipv4.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 300056732953..7e3712ce3994 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -569,6 +569,13 @@ static struct ctl_table ipv4_table[] = {
569 .proc_handler = proc_dointvec, 569 .proc_handler = proc_dointvec,
570 }, 570 },
571 { 571 {
572 .procname = "tcp_cookie_size",
573 .data = &sysctl_tcp_cookie_size,
574 .maxlen = sizeof(int),
575 .mode = 0644,
576 .proc_handler = proc_dointvec
577 },
578 {
572 .procname = "udp_mem", 579 .procname = "udp_mem",
573 .data = &sysctl_udp_mem, 580 .data = &sysctl_udp_mem,
574 .maxlen = sizeof(sysctl_udp_mem), 581 .maxlen = sizeof(sysctl_udp_mem),
@@ -660,7 +667,7 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
660 struct ctl_table *table; 667 struct ctl_table *table;
661 668
662 table = ipv4_net_table; 669 table = ipv4_net_table;
663 if (net != &init_net) { 670 if (!net_eq(net, &init_net)) {
664 table = kmemdup(table, sizeof(ipv4_net_table), GFP_KERNEL); 671 table = kmemdup(table, sizeof(ipv4_net_table), GFP_KERNEL);
665 if (table == NULL) 672 if (table == NULL)
666 goto err_alloc; 673 goto err_alloc;
@@ -691,7 +698,7 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
691 return 0; 698 return 0;
692 699
693err_reg: 700err_reg:
694 if (net != &init_net) 701 if (!net_eq(net, &init_net))
695 kfree(table); 702 kfree(table);
696err_alloc: 703err_alloc:
697 return -ENOMEM; 704 return -ENOMEM;