Messages in this thread | | | Date | Thu, 15 Sep 2005 13:57:25 -0400 | From | Benjamin LaHaise <> | Subject | Re: [NETFILTER]: Use correct type for "ports" module parameter |
| |
On Tue, Sep 13, 2005 at 06:00:23PM -0700, Linux Kernel Mailing List wrote: > --- a/net/ipv4/netfilter/ip_conntrack_ftp.c > +++ b/net/ipv4/netfilter/ip_conntrack_ftp.c > @@ -29,9 +29,9 @@ static char *ftp_buffer; > static DEFINE_SPINLOCK(ip_ftp_lock); > > #define MAX_PORTS 8 > -static int ports[MAX_PORTS]; > +static short ports[MAX_PORTS]; > static int ports_c; > -module_param_array(ports, int, &ports_c, 0400); > +module_param_array(ports, short, &ports_c, 0400);
Shouldn't this be unsigned short? As near as I can tell the negative sign extension will result in the same problem this patch was trying to fix as the code does 'sprintf(tmpname, "ftp-%d", ports[i]);'...
-ben
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |