From: Pablo Neira Ayuso Date: Fri, 29 Nov 2013 10:28:07 +0000 (+0100) Subject: meta: fix endianness in UID/GID X-Git-Tag: v0.099~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f513f1d264c0a6c481e04fd346d35e9fb9a56e2;p=thirdparty%2Fnftables.git meta: fix endianness in UID/GID add rule filter output meta skuid vmap { 1000 => accept } list table filter meta skuid map { 3892510720 => accept} ^--------^ this is 1000 in network byte order Reported-by: Bjørnar Ness Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/meta.c b/src/meta.c index 9606a44b..80c2638f 100644 --- a/src/meta.c +++ b/src/meta.c @@ -230,7 +230,7 @@ static const struct datatype uid_type = { .type = TYPE_UID, .name = "uid", .desc = "user ID", - .byteorder = BYTEORDER_BIG_ENDIAN, + .byteorder = BYTEORDER_HOST_ENDIAN, .size = sizeof(uid_t) * BITS_PER_BYTE, .basetype = &integer_type, .print = uid_type_print, @@ -275,7 +275,7 @@ static const struct datatype gid_type = { .type = TYPE_GID, .name = "gid", .desc = "group ID", - .byteorder = BYTEORDER_BIG_ENDIAN, + .byteorder = BYTEORDER_HOST_ENDIAN, .size = sizeof(gid_t) * BITS_PER_BYTE, .basetype = &integer_type, .print = gid_type_print,