From: Simon Horman <horms@verge.net.au>
To: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org
Cc: Wensong Zhang <wensong@linux-vs.org>,
Julian Anastasov <ja@ssi.bg>, Patrick McHardy <kaber@trash.net>,
Pablo Neira Ayuso <pablo@netfilter.org>,
"David S. Miller" <davem@davemloft.net>,
Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>,
Simon Horman <horms@verge.net.au>
Subject: [PATCH 1/5] ipvs: Expose ip_vs_ftp module parameters via sysfs.
Date: Mon, 26 Sep 2011 18:05:34 +0900 [thread overview]
Message-ID: <1317027938-22053-2-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1317027938-22053-1-git-send-email-horms@verge.net.au>
From: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This is to expose "ports" parameter via sysfs so it can be read
at any time in order to determine what port or ports were passed
to the module at the point when it was loaded.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_ftp.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index 4490a32..538d74e 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -52,8 +52,9 @@
* List of ports (up to IP_VS_APP_MAX_PORTS) to be handled by helper
* First port is set to the default port.
*/
+static unsigned int ports_count = 1;
static unsigned short ports[IP_VS_APP_MAX_PORTS] = {21, 0};
-module_param_array(ports, ushort, NULL, 0);
+module_param_array(ports, ushort, &ports_count, 0444);
MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands");
@@ -449,7 +450,7 @@ static int __net_init __ip_vs_ftp_init(struct net *net)
if (ret)
goto err_exit;
- for (i=0; i<IP_VS_APP_MAX_PORTS; i++) {
+ for (i = 0; i < ports_count; i++) {
if (!ports[i])
continue;
ret = register_ip_vs_app_inc(net, app, app->protocol, ports[i]);
--
1.7.5.4
next prev parent reply other threads:[~2011-09-26 9:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 9:05 [GIT PULL net-next] IPVS Simon Horman
2011-09-26 9:05 ` Simon Horman [this message]
2011-09-26 9:05 ` [PATCH 2/5] IPVS: Add documentation for new sysctl entries Simon Horman
2011-09-26 9:05 ` [PATCH 3/5] IPVS: Remove unused parameter from ip_vs_confirm_conntrack() Simon Horman
2011-09-26 9:05 ` [PATCH 4/5] IPVS: Remove unused return value of protocol state transitions Simon Horman
2011-09-26 9:05 ` [PATCH 5/5] IPVS: Removed unused variables Simon Horman
2011-09-27 8:16 ` [GIT PULL net-next] IPVS Pablo Neira Ayuso
2011-09-28 13:28 ` Simon Horman
2011-09-28 15:45 ` Pablo Neira Ayuso
2011-09-28 19:13 ` Pablo Neira Ayuso
2011-09-28 21:45 ` Pablo Neira Ayuso
2011-09-28 23:01 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317027938-22053-2-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=davem@davemloft.net \
--cc=ja@ssi.bg \
--cc=kaber@trash.net \
--cc=krzysztof.wilczynski@linux.com \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=wensong@linux-vs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).