提交 9055fa1f 编写于 作者: S Simon Horman 提交者: David S. Miller

[IPVS]: Move remaining sysctl handlers over to CTL_UNNUMBERED

Switch the remaining IPVS sysctl entries over to to use CTL_UNNUMBERED,
I stronly doubt that anyone is using the sys_sysctl interface to
these variables.
Signed-off-by: NSimon Horman <horms@verge.net.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9e103fa6
...@@ -327,34 +327,6 @@ extern int ip_vs_get_debug_level(void); ...@@ -327,34 +327,6 @@ extern int ip_vs_get_debug_level(void);
#define FTPPORT __constant_htons(21) #define FTPPORT __constant_htons(21)
#define FTPDATA __constant_htons(20) #define FTPDATA __constant_htons(20)
/*
* IPVS sysctl variables under the /proc/sys/net/ipv4/vs/
*/
#define NET_IPV4_VS 21
enum {
NET_IPV4_VS_DEBUG_LEVEL=1,
NET_IPV4_VS_AMEMTHRESH=2,
NET_IPV4_VS_AMDROPRATE=3,
NET_IPV4_VS_TO_ES=7,
NET_IPV4_VS_TO_SS=8,
NET_IPV4_VS_TO_SR=9,
NET_IPV4_VS_TO_FW=10,
NET_IPV4_VS_TO_TW=11,
NET_IPV4_VS_TO_CL=12,
NET_IPV4_VS_TO_CW=13,
NET_IPV4_VS_TO_LA=14,
NET_IPV4_VS_TO_LI=15,
NET_IPV4_VS_TO_SA=16,
NET_IPV4_VS_TO_UDP=17,
NET_IPV4_VS_TO_ICMP=18,
NET_IPV4_VS_CACHE_BYPASS=22,
NET_IPV4_VS_EXPIRE_NODEST_CONN=23,
NET_IPV4_VS_NAT_ICMP_SEND=25,
NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26,
NET_IPV4_VS_LAST
};
/* /*
* TCP State Values * TCP State Values
*/ */
......
...@@ -237,30 +237,6 @@ static struct trans_ctl_table trans_net_ipv4_conf_table[] = { ...@@ -237,30 +237,6 @@ static struct trans_ctl_table trans_net_ipv4_conf_table[] = {
{} {}
}; };
static struct trans_ctl_table trans_net_ipv4_vs_table[] = {
{ NET_IPV4_VS_AMEMTHRESH, "amemthresh" },
{ NET_IPV4_VS_DEBUG_LEVEL, "debug_level" },
{ NET_IPV4_VS_AMDROPRATE, "am_droprate" },
{ NET_IPV4_VS_TO_ES, "timeout_established" },
{ NET_IPV4_VS_TO_SS, "timeout_synsent" },
{ NET_IPV4_VS_TO_SR, "timeout_synrecv" },
{ NET_IPV4_VS_TO_FW, "timeout_finwait" },
{ NET_IPV4_VS_TO_TW, "timeout_timewait" },
{ NET_IPV4_VS_TO_CL, "timeout_close" },
{ NET_IPV4_VS_TO_CW, "timeout_closewait" },
{ NET_IPV4_VS_TO_LA, "timeout_lastack" },
{ NET_IPV4_VS_TO_LI, "timeout_listen" },
{ NET_IPV4_VS_TO_SA, "timeout_synack" },
{ NET_IPV4_VS_TO_UDP, "timeout_udp" },
{ NET_IPV4_VS_TO_ICMP, "timeout_icmp" },
{ NET_IPV4_VS_CACHE_BYPASS, "cache_bypass" },
{ NET_IPV4_VS_EXPIRE_NODEST_CONN, "expire_nodest_conn" },
{ NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE, "expire_quiescent_template" },
{ NET_IPV4_VS_NAT_ICMP_SEND, "nat_icmp_send" },
{}
};
static struct trans_ctl_table trans_net_neigh_vars_table[] = { static struct trans_ctl_table trans_net_neigh_vars_table[] = {
{ NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" }, { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" },
{ NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" }, { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" },
...@@ -335,7 +311,6 @@ static struct trans_ctl_table trans_net_ipv4_table[] = { ...@@ -335,7 +311,6 @@ static struct trans_ctl_table trans_net_ipv4_table[] = {
{ NET_IPV4_ROUTE, "route", trans_net_ipv4_route_table }, { NET_IPV4_ROUTE, "route", trans_net_ipv4_route_table },
/* NET_IPV4_FIB_HASH unused */ /* NET_IPV4_FIB_HASH unused */
{ NET_IPV4_NETFILTER, "netfilter", trans_net_ipv4_netfilter_table }, { NET_IPV4_NETFILTER, "netfilter", trans_net_ipv4_netfilter_table },
{ NET_IPV4_VS, "vs", trans_net_ipv4_vs_table },
{ NET_IPV4_TCP_TIMESTAMPS, "tcp_timestamps" }, { NET_IPV4_TCP_TIMESTAMPS, "tcp_timestamps" },
{ NET_IPV4_TCP_WINDOW_SCALING, "tcp_window_scaling" }, { NET_IPV4_TCP_WINDOW_SCALING, "tcp_window_scaling" },
......
...@@ -1424,7 +1424,6 @@ proc_do_sync_threshold(ctl_table *table, int write, struct file *filp, ...@@ -1424,7 +1424,6 @@ proc_do_sync_threshold(ctl_table *table, int write, struct file *filp,
static struct ctl_table vs_vars[] = { static struct ctl_table vs_vars[] = {
{ {
.ctl_name = NET_IPV4_VS_AMEMTHRESH,
.procname = "amemthresh", .procname = "amemthresh",
.data = &sysctl_ip_vs_amemthresh, .data = &sysctl_ip_vs_amemthresh,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1433,7 +1432,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1433,7 +1432,6 @@ static struct ctl_table vs_vars[] = {
}, },
#ifdef CONFIG_IP_VS_DEBUG #ifdef CONFIG_IP_VS_DEBUG
{ {
.ctl_name = NET_IPV4_VS_DEBUG_LEVEL,
.procname = "debug_level", .procname = "debug_level",
.data = &sysctl_ip_vs_debug_level, .data = &sysctl_ip_vs_debug_level,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1442,7 +1440,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1442,7 +1440,6 @@ static struct ctl_table vs_vars[] = {
}, },
#endif #endif
{ {
.ctl_name = NET_IPV4_VS_AMDROPRATE,
.procname = "am_droprate", .procname = "am_droprate",
.data = &sysctl_ip_vs_am_droprate, .data = &sysctl_ip_vs_am_droprate,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1472,7 +1469,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1472,7 +1469,6 @@ static struct ctl_table vs_vars[] = {
}, },
#if 0 #if 0
{ {
.ctl_name = NET_IPV4_VS_TO_ES,
.procname = "timeout_established", .procname = "timeout_established",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED], .data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1480,7 +1476,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1480,7 +1476,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_SS,
.procname = "timeout_synsent", .procname = "timeout_synsent",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT], .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1488,7 +1483,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1488,7 +1483,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_SR,
.procname = "timeout_synrecv", .procname = "timeout_synrecv",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV], .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1496,7 +1490,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1496,7 +1490,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_FW,
.procname = "timeout_finwait", .procname = "timeout_finwait",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT], .data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1504,7 +1497,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1504,7 +1497,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_TW,
.procname = "timeout_timewait", .procname = "timeout_timewait",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT], .data = &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1512,7 +1504,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1512,7 +1504,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_CL,
.procname = "timeout_close", .procname = "timeout_close",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE], .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1520,7 +1511,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1520,7 +1511,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_CW,
.procname = "timeout_closewait", .procname = "timeout_closewait",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT], .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1528,7 +1518,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1528,7 +1518,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_LA,
.procname = "timeout_lastack", .procname = "timeout_lastack",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK], .data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1536,7 +1525,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1536,7 +1525,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_LI,
.procname = "timeout_listen", .procname = "timeout_listen",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN], .data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1544,7 +1532,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1544,7 +1532,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_SA,
.procname = "timeout_synack", .procname = "timeout_synack",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK], .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1552,7 +1539,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1552,7 +1539,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_UDP,
.procname = "timeout_udp", .procname = "timeout_udp",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP], .data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1560,7 +1546,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1560,7 +1546,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_IPV4_VS_TO_ICMP,
.procname = "timeout_icmp", .procname = "timeout_icmp",
.data = &vs_timeout_table_dos.timeout[IP_VS_S_ICMP], .data = &vs_timeout_table_dos.timeout[IP_VS_S_ICMP],
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1569,7 +1554,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1569,7 +1554,6 @@ static struct ctl_table vs_vars[] = {
}, },
#endif #endif
{ {
.ctl_name = NET_IPV4_VS_CACHE_BYPASS,
.procname = "cache_bypass", .procname = "cache_bypass",
.data = &sysctl_ip_vs_cache_bypass, .data = &sysctl_ip_vs_cache_bypass,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1577,7 +1561,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1577,7 +1561,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_VS_EXPIRE_NODEST_CONN,
.procname = "expire_nodest_conn", .procname = "expire_nodest_conn",
.data = &sysctl_ip_vs_expire_nodest_conn, .data = &sysctl_ip_vs_expire_nodest_conn,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1585,7 +1568,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1585,7 +1568,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE,
.procname = "expire_quiescent_template", .procname = "expire_quiescent_template",
.data = &sysctl_ip_vs_expire_quiescent_template, .data = &sysctl_ip_vs_expire_quiescent_template,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1600,7 +1582,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1600,7 +1582,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = &proc_do_sync_threshold, .proc_handler = &proc_do_sync_threshold,
}, },
{ {
.ctl_name = NET_IPV4_VS_NAT_ICMP_SEND,
.procname = "nat_icmp_send", .procname = "nat_icmp_send",
.data = &sysctl_ip_vs_nat_icmp_send, .data = &sysctl_ip_vs_nat_icmp_send,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -1612,7 +1593,6 @@ static struct ctl_table vs_vars[] = { ...@@ -1612,7 +1593,6 @@ static struct ctl_table vs_vars[] = {
static ctl_table vs_table[] = { static ctl_table vs_table[] = {
{ {
.ctl_name = NET_IPV4_VS,
.procname = "vs", .procname = "vs",
.mode = 0555, .mode = 0555,
.child = vs_vars .child = vs_vars
......
...@@ -125,7 +125,6 @@ static ctl_table vs_vars_table[] = { ...@@ -125,7 +125,6 @@ static ctl_table vs_vars_table[] = {
static ctl_table vs_table[] = { static ctl_table vs_table[] = {
{ {
.ctl_name = NET_IPV4_VS,
.procname = "vs", .procname = "vs",
.mode = 0555, .mode = 0555,
.child = vs_vars_table .child = vs_vars_table
......
...@@ -313,7 +313,6 @@ static ctl_table vs_vars_table[] = { ...@@ -313,7 +313,6 @@ static ctl_table vs_vars_table[] = {
static ctl_table vs_table[] = { static ctl_table vs_table[] = {
{ {
.ctl_name = NET_IPV4_VS,
.procname = "vs", .procname = "vs",
.mode = 0555, .mode = 0555,
.child = vs_vars_table .child = vs_vars_table
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册