Re: [PATCH v2 nf-next] netfilter: nft_ct: allow to set ctnetlink event types of a connection

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

 



Liping Zhang <zlpnobody@xxxxxxxxx> wrote:
> 2017-04-15 18:26 GMT+08:00 Florian Westphal <fw@xxxxxxxxx>:
> [...]
> > +#ifdef CONFIG_NF_CONNTRACK_EVENTS
> > +       case NFT_CT_EVENTMASK: {
> > +               struct nf_conntrack_ecache *e = nf_ct_ecache_find(ct);
> > +               u16 ctmask = nft_reg_load16(&regs->data[priv->sreg]);
> 
> Hmm, I find that in nft utility, this ctmask is defined as a 32 bit value.

Right, it was deliberate to not have to extend it later on in case we
get more event values in future.

> So using nft_reg_load16 maybe wrong. In order to avoid ambiguity,
> I think it's better to convert it to "u32 ctmask = regs->data[priv->sreg];".

Agree, thats what I'll do, thanks Liping.
--
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