Re: [PATCH v6 -next 2/4] netfilter: nftables: add connlabel set support

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

 



Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> Different thing is to indicate the bit number from an immediate, ie.
> we use set_bit() based on the register data that we get, so we can use
> maps as Patrick suggests.

Right.

> > I don't want to resubmit until there is consensus as to what the
> > preferred solution is.
> >
> > We could go for a 3rd alternative, namely:
> > 
> > u16 bit = regs->data[priv->sreg];
> > set_bit(bit, ct->labels);
> >
> > i.e. have userspace place the _bit_ that we want to set in the
> > source register.
> > 
> > If we go for sreg that would be my favored solution.
> 
> I'm fine with this.

Ok.  Unless Patrick objects this is what I'll work on, i.e.
have nft_ct grab the bit number to toggle from the source register.

> > The only drawback vs #1 is that get and set work differently
> > (get places all labels into dreg, set expects bit to set).
> > 
> > (We also need to validate at eval time but thats not a problem
> >  in this case).
> 
> You mean a check to make sure we don't go over the boundary, just to
> avoid crashing. That seems OK to me.

Yes, thats what I meant.
--
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