diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-10 13:35:57 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-10 18:42:37 +0100 |
commit | 6e39ecbf6aa6ca5f9a1fc999ea56bf8a5d29ea9e (patch) | |
tree | edc5b155dac4bcd58885dcd1b680776700577ff0 /src/expr/cmp.c | |
parent | 5a2a1e0447bc9dc3defe6dca75e6a54312bbb045 (diff) |
expr: data_reg: use 'reg' instead of 'data_reg'
data_reg is unnecessarily long name and it always has to be
wrapped by another data node. This will allow us to represent
data not only as registers if needed.
Get rid of 'cmpdata' and 'immediatedata' too and use 'data'
instead to wrap 'reg' so these are consistent with the bitwise
expression. No reason for such specific tag per expression.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/cmp.c')
-rw-r--r-- | src/expr/cmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr/cmp.c b/src/expr/cmp.c index b186df0..3ca4b08 100644 --- a/src/expr/cmp.c +++ b/src/expr/cmp.c @@ -201,7 +201,7 @@ static int nft_rule_expr_cmp_json_parse(struct nft_rule_expr *e, json_t *root, nft_rule_expr_set_u32(e, NFT_EXPR_CMP_OP, base); } - if (nft_jansson_data_reg_parse(root, "cmpdata", + if (nft_jansson_data_reg_parse(root, "data", &cmp->data, err) == DATA_VALUE) e->flags |= (1 << NFT_EXPR_CMP_DATA); @@ -235,7 +235,7 @@ static int nft_rule_expr_cmp_xml_parse(struct nft_rule_expr *e, mxml_node_t *tre nft_rule_expr_set_u32(e, NFT_EXPR_CMP_OP, op_value); } - if (nft_mxml_data_reg_parse(tree, "cmpdata", + if (nft_mxml_data_reg_parse(tree, "data", &cmp->data, NFT_XML_MAND, err) == DATA_VALUE) e->flags |= (1 << NFT_EXPR_CMP_DATA); |