diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ct.c | 2 | ||||
-rw-r--r-- | src/datatype.c | 4 | ||||
-rw-r--r-- | src/meta.c | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -110,7 +110,7 @@ static const struct ct_template ct_templates[] = { BYTEORDER_HOST_ENDIAN, 4 * BITS_PER_BYTE), [NFT_CT_HELPER] = CT_TEMPLATE("helper", &string_type, - BYTEORDER_INVALID, 0), + BYTEORDER_HOST_ENDIAN, 0), [NFT_CT_L3PROTOCOL] = CT_TEMPLATE("l3proto", &invalid_type, BYTEORDER_INVALID, BITS_PER_BYTE), diff --git a/src/datatype.c b/src/datatype.c index c4fc131d..4c5a70f2 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -258,7 +258,7 @@ static void string_type_print(const struct expr *expr) unsigned int len = div_round_up(expr->len, BITS_PER_BYTE); char data[len]; - mpz_export_data(data, expr->value, BYTEORDER_BIG_ENDIAN, len); + mpz_export_data(data, expr->value, BYTEORDER_HOST_ENDIAN, len); printf("\"%s\"", data); } @@ -266,7 +266,7 @@ static struct error_record *string_type_parse(const struct expr *sym, struct expr **res) { *res = constant_expr_alloc(&sym->location, &string_type, - BYTEORDER_INVALID, + BYTEORDER_HOST_ENDIAN, (strlen(sym->identifier) + 1) * BITS_PER_BYTE, sym->identifier); return NULL; @@ -295,14 +295,14 @@ static const struct meta_template meta_templates[] = { 4 * 8, BYTEORDER_HOST_ENDIAN), [NFT_META_IIFNAME] = META_TEMPLATE("iifname", &string_type, IFNAMSIZ * BITS_PER_BYTE, - BYTEORDER_INVALID), + BYTEORDER_HOST_ENDIAN), [NFT_META_IIFTYPE] = META_TEMPLATE("iiftype", &arphrd_type, 2 * 8, BYTEORDER_HOST_ENDIAN), [NFT_META_OIF] = META_TEMPLATE("oif", &ifindex_type, 4 * 8, BYTEORDER_HOST_ENDIAN), [NFT_META_OIFNAME] = META_TEMPLATE("oifname", &string_type, IFNAMSIZ * BITS_PER_BYTE, - BYTEORDER_INVALID), + BYTEORDER_HOST_ENDIAN), [NFT_META_OIFTYPE] = META_TEMPLATE("oiftype", &arphrd_type, 2 * 8, BYTEORDER_HOST_ENDIAN), [NFT_META_SKUID] = META_TEMPLATE("skuid", &uid_type, |