Re: [PATCH iptables] extensions: mark: prefer plain 'set' over 'set mark and'

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

 



On Mon, Feb 19, 2018 at 12:46:45PM +0100, Florian Westphal wrote:
> adding a test case for MARK --set-mark 0 fails with
> exp: nft add rule ip mangle OUTPUT counter meta mark set 0x0
> res: nft add rule ip mangle OUTPUT counter meta mark set mark and 0x0
> 
> This translation isn't wrong, but unneccessarily complex, so
> change order to first check if mask bits are all ones.
> 
> In that case we can simply use an immediate value without
> need for logical operators.
> 
> Signed-off-by: Florian Westphal <fw@xxxxxxxxx>

LGTM, thanks Florian.
--
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