[PATCH nft] payload: set byteorder when completing expression

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

 



Otherwise payload expression remains in invalid byteorder which is
handled as network byteorder for historical reason.

No functional change is intended.

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
IIRC, Jeremy posted a similar patch.

 src/payload.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/payload.c b/src/payload.c
index ed76623c9393..f67b54078792 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -991,6 +991,7 @@ void payload_expr_complete(struct expr *expr, const struct proto_ctx *ctx)
 
 		expr->dtype	   = tmpl->dtype;
 		expr->payload.desc = desc;
+		expr->byteorder = tmpl->byteorder;
 		expr->payload.tmpl = tmpl;
 		return;
 	}
-- 
2.30.2




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

  Powered by Linux