From: Patrick McHardy Date: Tue, 28 Jul 2009 12:17:42 +0000 (+0200) Subject: netlink: fix binop RHS byteorder X-Git-Tag: v0.099~179 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaefa819182d968ba6f4958fc8d909165feee0b6;p=thirdparty%2Fnftables.git 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 --- 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;