|
@@ -1591,34 +1591,13 @@ static struct ctl_table vs_vars[] = {
|
|
|
{ .ctl_name = 0 }
|
|
|
};
|
|
|
|
|
|
-static ctl_table vs_table[] = {
|
|
|
- {
|
|
|
- .procname = "vs",
|
|
|
- .mode = 0555,
|
|
|
- .child = vs_vars
|
|
|
- },
|
|
|
- { .ctl_name = 0 }
|
|
|
-};
|
|
|
-
|
|
|
-static ctl_table ipvs_ipv4_table[] = {
|
|
|
- {
|
|
|
- .ctl_name = NET_IPV4,
|
|
|
- .procname = "ipv4",
|
|
|
- .mode = 0555,
|
|
|
- .child = vs_table,
|
|
|
- },
|
|
|
- { .ctl_name = 0 }
|
|
|
-};
|
|
|
-
|
|
|
-static ctl_table vs_root_table[] = {
|
|
|
- {
|
|
|
- .ctl_name = CTL_NET,
|
|
|
- .procname = "net",
|
|
|
- .mode = 0555,
|
|
|
- .child = ipvs_ipv4_table,
|
|
|
- },
|
|
|
- { .ctl_name = 0 }
|
|
|
+struct ctl_path net_vs_ctl_path[] = {
|
|
|
+ { .procname = "net", .ctl_name = CTL_NET, },
|
|
|
+ { .procname = "ipv4", .ctl_name = NET_IPV4, },
|
|
|
+ { .procname = "vs", },
|
|
|
+ { }
|
|
|
};
|
|
|
+EXPORT_SYMBOL_GPL(net_vs_ctl_path);
|
|
|
|
|
|
static struct ctl_table_header * sysctl_header;
|
|
|
|
|
@@ -2345,7 +2324,7 @@ int ip_vs_control_init(void)
|
|
|
proc_net_fops_create(&init_net, "ip_vs", 0, &ip_vs_info_fops);
|
|
|
proc_net_fops_create(&init_net, "ip_vs_stats",0, &ip_vs_stats_fops);
|
|
|
|
|
|
- sysctl_header = register_sysctl_table(vs_root_table);
|
|
|
+ sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars);
|
|
|
|
|
|
/* Initialize ip_vs_svc_table, ip_vs_svc_fwm_table, ip_vs_rtable */
|
|
|
for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) {
|