Commit b552216f authored by Simon Horman's avatar Simon Horman Committed by David S. Miller

[IPVS]: remove the debug option go ip_vs_ftp

This patch makes the debuging behaviour of this code more consistent
with the rest of IPVS.
Signed-Off-By: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f5af5b3
...@@ -48,14 +48,6 @@ static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; ...@@ -48,14 +48,6 @@ static int ports[IP_VS_APP_MAX_PORTS] = {21, 0};
module_param_array(ports, int, NULL, 0); module_param_array(ports, int, NULL, 0);
MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands"); MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands");
/*
* Debug level
*/
#ifdef CONFIG_IP_VS_DEBUG
static int debug=0;
module_param(debug, int, 0);
#endif
/* Dummy variable */ /* Dummy variable */
static int ip_vs_ftp_pasv; static int ip_vs_ftp_pasv;
...@@ -178,7 +170,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -178,7 +170,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
&start, &end) != 1) &start, &end) != 1)
return 1; return 1;
IP_VS_DBG(1-debug, "PASV response (%u.%u.%u.%u:%d) -> " IP_VS_DBG(7, "PASV response (%u.%u.%u.%u:%d) -> "
"%u.%u.%u.%u:%d detected\n", "%u.%u.%u.%u:%d detected\n",
NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0); NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0);
...@@ -281,7 +273,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -281,7 +273,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
while (data <= data_limit - 6) { while (data <= data_limit - 6) {
if (strnicmp(data, "PASV\r\n", 6) == 0) { if (strnicmp(data, "PASV\r\n", 6) == 0) {
/* Passive mode on */ /* Passive mode on */
IP_VS_DBG(1-debug, "got PASV at %zd of %zd\n", IP_VS_DBG(7, "got PASV at %zd of %zd\n",
data - data_start, data - data_start,
data_limit - data_start); data_limit - data_start);
cp->app_data = &ip_vs_ftp_pasv; cp->app_data = &ip_vs_ftp_pasv;
...@@ -303,7 +295,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -303,7 +295,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
&start, &end) != 1) &start, &end) != 1)
return 1; return 1;
IP_VS_DBG(1-debug, "PORT %u.%u.%u.%u:%d detected\n", IP_VS_DBG(7, "PORT %u.%u.%u.%u:%d detected\n",
NIPQUAD(to), ntohs(port)); NIPQUAD(to), ntohs(port));
/* Passive mode off */ /* Passive mode off */
...@@ -312,7 +304,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -312,7 +304,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
/* /*
* Now update or create a connection entry for it * Now update or create a connection entry for it
*/ */
IP_VS_DBG(1-debug, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", IP_VS_DBG(7, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n",
ip_vs_proto_name(iph->protocol), ip_vs_proto_name(iph->protocol),
NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0); NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0);
...@@ -382,8 +374,8 @@ static int __init ip_vs_ftp_init(void) ...@@ -382,8 +374,8 @@ static int __init ip_vs_ftp_init(void)
ret = register_ip_vs_app_inc(app, app->protocol, ports[i]); ret = register_ip_vs_app_inc(app, app->protocol, ports[i]);
if (ret) if (ret)
break; break;
IP_VS_DBG(1-debug, "%s: loaded support on port[%d] = %d\n", IP_VS_INFO("%s: loaded support on port[%d] = %d\n",
app->name, i, ports[i]); app->name, i, ports[i]);
} }
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment