[PATCH nft 1/2] evaluate: update byteorder only for implicit maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The byteorder adjustment for the integer datatype is only required by
implicit maps.

Fixes: b9b6092304ae ("evaluate: store byteorder for set keys")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/evaluate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index a41a28e97288..337b66c5ad2d 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -84,7 +84,8 @@ static struct expr *implicit_set_declaration(struct eval_ctx *ctx,
 	struct set *set;
 	struct handle h;
 
-	key_fix_dtype_byteorder(key);
+	if (expr->set_flags & NFT_SET_MAP)
+		key_fix_dtype_byteorder(key);
 
 	set = set_alloc(&expr->location);
 	set->flags	= NFT_SET_ANONYMOUS | expr->set_flags;
-- 
2.11.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux