summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiping Zhang <liping.zhang@spreadtrum.com>2016-05-29 18:08:08 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-05-30 11:55:46 +0200
commitcc4e645b15da8e887f465955b9663ebc4c768cc5 (patch)
treec9e54b0404e12483abbf00438d124e866a5d8577
parent61f851beda31aa3a7dcd4ef534d91b5cfb13594b (diff)
meta: fix endianness in priority
For example, after we add rule to set priority 1:2, it will be displayed in network byte order as 0200:0100, this is wrong: # nft add rule filter test meta priority set 1:2 # nft list chain filter test table ip filter { chain test { meta priority set 0200:0100 } } Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/meta.c b/src/meta.c
index b8db0f89..74d2b4cc 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -128,7 +128,7 @@ static const struct datatype tchandle_type = {
.type = TYPE_TC_HANDLE,
.name = "tc_handle",
.desc = "TC handle",
- .byteorder = BYTEORDER_BIG_ENDIAN,
+ .byteorder = BYTEORDER_HOST_ENDIAN,
.size = 4 * BITS_PER_BYTE,
.basetype = &integer_type,
.print = tchandle_type_print,