Horms wrote:
> 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 <[EMAIL PROTECTED]>
> Index: linux-2.6/net/ipv4/ipvs/ip_vs_ftp.c
> ===================================================================
> --- linux-2.6.orig/net/ipv4/ipvs/ip_vs_ftp.c  2006-09-01 19:06:42.000000000 
> +0900
> +++ linux-2.6/net/ipv4/ipvs/ip_vs_ftp.c       2006-09-01 19:08:19.000000000 
> +0900
> @@ -373,6 +373,12 @@
>       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;
> +             }

How about just changing the module parameter type to ushort, similar to
what ip_conntrack_ftp does?

# modprobe ip_conntrack_ftp ports=999392
ip_conntrack_ftp: `999392' invalid for parameter `ports'


-- 
VGER BF report: H 0.41558
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to