summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2006-09-13 19:58:44 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-17 23:21:05 -0700
commit3f5af5b353ca36aca4f8a46e3da2172f669dbbbc (patch)
tree25e92e2d951e8d6d709208a71fca6cc738e7cbcd /net
parent70e76b768bac81149c8c189e781c3f130ea2eba5 (diff)
downloadop-kernel-dev-3f5af5b353ca36aca4f8a46e3da2172f669dbbbc.zip
op-kernel-dev-3f5af5b353ca36aca4f8a46e3da2172f669dbbbc.tar.gz
[IPVS]: Make sure ip_vs_ftp ports are valid
I'm not entirely sure what happens in the case of a valid port, at best it'll be silently ignored. This patch ignores them a little more verbosely. Signed-Off-By: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ipvs/ip_vs_ftp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c
index 347a66c..f0c553c 100644
--- a/net/ipv4/ipvs/ip_vs_ftp.c
+++ b/net/ipv4/ipvs/ip_vs_ftp.c
@@ -373,6 +373,12 @@ static int __init ip_vs_ftp_init(void)
for (i=0; i<IP_VS_APP_MAX_PORTS; i++) {
if (!ports[i])
continue;
+ if (ports[i] < 0 || ports[i] > 0xffff) {
+ IP_VS_WARNING("ip_vs_ftp: Ignoring invalid "
+ "configuration port[%d] = %d\n",
+ i, ports[i]);
+ continue;
+ }
ret = register_ip_vs_app_inc(app, app->protocol, ports[i]);
if (ret)
break;
OpenPOWER on IntegriCloud