提交 3f5af5b3 编写于 作者: S Simon Horman 提交者: David S. Miller

[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: NSimon Horman <horms@verge.net.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 70e76b76
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册