提交 4a7faaf4 编写于 作者: J Jeremy Sowden 提交者: Pablo Neira Ayuso

netfilter: nft_bitwise: correct uapi header comment.

The comment documenting how bitwise expressions work includes a table
which summarizes the mask and xor arguments combined to express the
supported boolean operations.  However, the row for OR:

 mask    xor
 0       x

is incorrect.

  dreg = (sreg & 0) ^ x

is not equivalent to:

  dreg = sreg | x

What the code actually does is:

  dreg = (sreg & ~x) ^ x

Update the documentation to match.
Signed-off-by: NJeremy Sowden <jeremy@azazel.net>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 6bc80380
......@@ -501,7 +501,7 @@ enum nft_immediate_attributes {
*
* mask xor
* NOT: 1 1
* OR: 0 x
* OR: ~x x
* XOR: 1 x
* AND: x 0
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册