Máté Eckl <eckl...@gmail.com> wrote:
> On Mon, May 28, 2018 at 05:43:18PM +0200, Florian Westphal wrote:
> > Máté Eckl <eckl...@gmail.com> wrote:
> > > > +const struct socket_template socket_templates[] = {
> > > > +       [NFT_SOCKET_TRANSPARENT]        = {.token = "transparent",
> > > > +                                          .dtype = &integer_type,
> > > > +                                          .len = 1 * BITS_PER_BYTE,
> > > 
> > > I wanted to use len = 1 here to only make 0 and 1 possible values, but it 
> > > always
> > > printed netlink: Error: Relational expression size mismatch.
> > 
> > Consider sending a patch that changes the error in
> > netlink_parse_cmp() to also give the sizes that its complaining about.
> > 
> > It would give a hint as to what could be wrong.
> 
> I don't think, this information is available there, as this message comes 
> from a
> == NULL comparison.

I guess its inside netlink_parse_concat_expr()?
Things are already wrong when it enters there.

if (left->len > right->len &&
     expr_basetype(left) != &string_type)

My guess is that left is 1 and right 8?
Could also be a 0-length due to missing round_up(), hard to tell
without knowing the actual value.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to