Re: [PATCH nft] fix integer type size to be used as a key for sets and maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 02, 2018 at 06:58:44PM +0100, Phil Sutter wrote:
> Hi Laura,
> 
> On Fri, Mar 02, 2018 at 05:34:02PM +0100, Laura Garcia Liebana wrote:
> [...]
> > diff --git a/src/datatype.c b/src/datatype.c
> > index 324ac80..06015bb 100644
> > --- a/src/datatype.c
> > +++ b/src/datatype.c
> > @@ -356,6 +356,7 @@ const struct datatype integer_type = {
> >  	.type		= TYPE_INTEGER,
> >  	.name		= "integer",
> >  	.desc		= "integer",
> > +	.size		= 4 * BITS_PER_BYTE,
> >  	.print		= integer_type_print,
> >  	.parse		= integer_type_parse,
> >  };
> 
> I'm not sure this is going to work: integer_type is used as basetype for
> many others, and there is at least lladdr_type which doesn't define a
> size on it's own (and is larger than four bytes). Are you sure this
> won't cause unexpected side-effects (like, e.g. lookups in sets
> containing lladdr_type entries returning false-positives)?

It seems that this issue requires a more elaborated fix. I'll check
it out.

Thanks Phil.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux