Re: [PATCH nft 1/5,v4] src: Revert --literal, add -S/--service

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

 



Hi,

On Mon, Oct 29, 2018 at 12:33:36PM +0100, Pablo Neira Ayuso wrote:
> This is a partial revert of b0f6a45b25dd1 ("src: add --literal option")
> which was added during the development cycle before 0.9.1 is released.
> 
> After looking at patch: https://patchwork.ozlabs.org/patch/969864/ that
> allows to print priority, uid, gid and protocols as numerics, I decided
> to revisit this to provide individual options to turn on literal
> printing.
> 
> What I'm proposing is to provide a good default for everyone, and
> provide options to turn on literal/numeric printing.
> 
> This patch adds nft_ctx_output_{set,get}_flags() and define two flags to
> enable reverse DNS lookups and to print ports as service names.
> 
> This patch introduces -S/--services, to print service names as per
> /etc/services.
> 
> Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>

Acked-by: Phil Sutter <phil@xxxxxx>

Just one minor nit:

[...]
> diff --git a/doc/libnftables.adoc b/doc/libnftables.adoc
> index 0387652fa3c1..1c6ea0152d13 100644
> --- a/doc/libnftables.adoc
> +++ b/doc/libnftables.adoc
[...]
> @@ -91,6 +91,25 @@ The *nft_ctx_get_dry_run*() function returns the dry-run setting's value contain
>  
>  The *nft_ctx_set_dry_run*() function sets the dry-run setting in 'ctx' to the value of 'dry'.
>  
> +=== nft_ctx_output_get_flags() and nft_ctx_output_set_flags()
> +The flags setting controls the output format.
> +
> +----
> +enum {
> +        NFT_CTX_OUTPUT_REVERSEDNS  = (1 << 0),
> +        NFT_CTX_OUTPUT_SERVICE     = (1 << 1),
> +};
> +----
> +
> +NFT_CTX_OUTPUT_REVERSEDNS::
> +	Perform reverse DNS lookups are performed for IP addresses when printing. Note that this may add significant delay to *list* commands depending on DNS resolver speed.

s/Perform reverse/Reverse/

Thanks, Phil



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

  Powered by Linux