Skip to content

Commit

Permalink
[IPVS]: Make sure ip_vs_ftp ports are valid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Horman authored and David S. Miller committed Sep 18, 2006
1 parent 70e76b7 commit 3f5af5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/ipv4/ipvs/ip_vs_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3f5af5b

Please sign in to comment.