Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f5af5b3 authored by Simon Horman's avatar Simon Horman Committed by David S. Miller
Browse files

[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: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70e76b76
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;