summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2020-01-01 13:41:32 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2020-01-16 15:51:14 +0100
commit4a7faaf4add3108522512c16c9ee08fb2ad4525e (patch)
tree665470f16d1aed6807b3ddb5fefa2449ca387259
parent6bc8038035267d12df2bf78a8e1a5f07069fabb8 (diff)
downloadlinux-4a7faaf4add3108522512c16c9ee08fb2ad4525e.tar.gz
linux-4a7faaf4add3108522512c16c9ee08fb2ad4525e.tar.bz2
linux-4a7faaf4add3108522512c16c9ee08fb2ad4525e.zip
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: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index e237ecbdcd8a..dd4611767933 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -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
*/