Re: [RFC PATCH nft 4/6] set_elem: parse expressions attached to set elements

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

 



On Fri, Nov 06, 2015 at 06:34:21PM +0000, Patrick McHardy wrote:
>  static void set_elem_expr_destroy(struct expr *expr)
> diff --git a/src/netlink.c b/src/netlink.c
> index ad86084..3bef5f4 100644
> --- a/src/netlink.c
> +++ b/src/netlink.c
> @@ -1472,6 +1472,8 @@ static int netlink_delinearize_setelem(struct nftnl_set_elem *nlse,
>  		expr->comment = xmalloc(len);
>  		memcpy((char *)expr->comment, data, len);
>  	}
> +	if (nftnl_set_elem_is_set(nlse, NFT_SET_ELEM_ATTR_EXPR))
> +		expr->stmt = netlink_parse_set_expr(set, (void *)nftnl_set_elem_get(nlse, NFT_SET_ELEM_ATTR_EXPR, NULL));


Minor nit I just noticed: please use NFTNL_SET_ELEM_EXPR here instead,
the old constant definitions will go after a couple of libnftnl
releases, they have been left there just to make the transition a bit
less traumatic.

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