Re: [libnftables PATCH] ct: fix dir, is optional

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

 



On Fri, Jan 17, 2014 at 02:15:06AM +0100, Arturo Borrero Gonzalez wrote:
> The dir attribute is optional as stated in the kernel sources.
> 
> Previous to this patch, using XML/JSON to manage this expr produces some
> undefined and erroneous behaviours.
> 
> While at it, fix also the default output format.

Applied, thanks. But see one thing below:

> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>
> ---
>  src/expr/ct.c |   63 +++++++++++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 47 insertions(+), 16 deletions(-)
> 
> diff --git a/src/expr/ct.c b/src/expr/ct.c
> index e960134..3442f06 100644
> --- a/src/expr/ct.c
> +++ b/src/expr/ct.c
> @@ -258,14 +258,12 @@ static int nft_rule_expr_ct_xml_parse(struct nft_rule_expr *e, mxml_node_t *tree
>  	e->flags |= (1 << NFT_EXPR_CT_KEY);
>  
>  	if (nft_mxml_num_parse(tree, "dir", MXML_DESCEND_FIRST, BASE_DEC,
> -			       &dir, NFT_TYPE_U8, NFT_XML_MAND, err) != 0)
> -		return -1;

I think it's better if you convert dir to use the "original" (0) and
"reply" strings (1). Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux