netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCH 1/4] payload: generate dependency in the appropriate byteorder
@ 2014-09-21 19:32 Alvaro Neira Ayuso
  2014-09-21 19:32 ` [nft PATCH 2/4] src: Enhance payload_gen_dependency() Alvaro Neira Ayuso
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Alvaro Neira Ayuso @ 2014-09-21 19:32 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber

If we add a dependency, the constant expression on the right
hand side must be represented in the appropriate order.

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 src/payload.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/payload.c b/src/payload.c
index 1eee4e0..a3bbe51 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -216,8 +216,7 @@ int payload_gen_dependency(struct eval_ctx *ctx, const struct expr *expr,
 		left = payload_expr_alloc(&expr->location, desc, desc->protocol_key);
 
 	right = constant_expr_alloc(&expr->location, tmpl->dtype,
-				    BYTEORDER_HOST_ENDIAN,
-				    tmpl->len,
+				    tmpl->dtype->byteorder, tmpl->len,
 				    constant_data_ptr(protocol, tmpl->len));
 
 	dep = relational_expr_alloc(&expr->location, OP_EQ, left, right);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-09-23  6:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-21 19:32 [nft PATCH 1/4] payload: generate dependency in the appropriate byteorder Alvaro Neira Ayuso
2014-09-21 19:32 ` [nft PATCH 2/4] src: Enhance payload_gen_dependency() Alvaro Neira Ayuso
2014-09-21 19:32 ` [nft PATCH 3/4] datatype: add symbolic_constant_parse_table() Alvaro Neira Ayuso
2014-09-22  7:59   ` Patrick McHardy
2014-09-22  9:05     ` Álvaro Neira Ayuso
2014-09-22 10:06       ` Patrick McHardy
2014-09-21 19:32 ` [nft PATCH 4/4 v3] nft: complete reject support Alvaro Neira Ayuso
2014-09-22  8:20   ` Patrick McHardy
2014-09-22 16:23     ` Álvaro Neira Ayuso
2014-09-23  6:43       ` Patrick McHardy
2014-09-22  7:54 ` [nft PATCH 1/4] payload: generate dependency in the appropriate byteorder Patrick McHardy
2014-09-22  9:01   ` Álvaro Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).