summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-07-28 14:17:42 +0200
committerPatrick McHardy <kaber@trash.net>2009-07-28 14:17:42 +0200
commiteaefa819182d968ba6f4958fc8d909165feee0b6 (patch)
treed11b3a331c038b8327062fd1473baa3115084a08
parentaeb84096c8cc413f81829f07ec285c3668d795ec (diff)
netlink: fix binop RHS byteorder
The byteorder of the RHS of a binop must be set before post-processing it to make sure it will get byteorder-switched if necessary. Fixes invalid conntrack expression states when used with bitmasks: ct state 33554432,67108864 counter packets 1924 bytes 142960 => ct state established,related counter packets 2029 bytes 151508 Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--src/netlink_delinearize.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 66690255..e71c129d 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -550,9 +550,10 @@ static void expr_postprocess(struct rule_pp_ctx *ctx,
break;
case EXPR_BINOP:
expr_postprocess(ctx, stmt, &expr->left);
- expr_postprocess(ctx, stmt, &expr->right);
expr_set_type(expr->right, expr->left->dtype,
expr->left->byteorder);
+ expr_postprocess(ctx, stmt, &expr->right);
+
expr_set_type(expr, expr->left->dtype,
expr->left->byteorder);
break;