Re: [iptables-nftables PATCH 2/3] nft: Generalize nft_rule_list() against current family

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

 



On Wed, Aug 07, 2013 at 11:31:36AM +0300, Tomasz Bursztyka wrote:
> Now, firewall rule printing is done through nft_family_ops
> .print_firewall function. This moves generic part for ipv4 and ipv6 into
> nft-shared.c, and enables reusing nft_rule_list() for other family such
> as ARP which will be useful for arptables compatibility tool.

Applied with one nitpick, thanks Tomasz.

> diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c
> index c0ee4c8..ad3e675 100644
> --- a/iptables/nft-shared.c
> +++ b/iptables/nft-shared.c
> @@ -277,6 +281,59 @@ void parse_meta(struct nft_rule_expr *e, uint8_t key, char *iniface,
>  	}
>  }
>  
> +const char *nft_parse_target(struct nft_rule *r, const void **targinfo,
> +			     size_t *target_len)
> +{
> +	struct nft_rule_expr_iter *iter;
> +	struct nft_rule_expr *expr;
> +	const char *targname;

Need targname = NULL, otherwise:

nft-shared.c: In function ‘nft_parse_target’:
nft-shared.c:289:14: warning: ‘targname’ may be used uninitialized in
this function [-Wmaybe-uninitialized
--
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