Re: [nft,RFC] rule: introduce new option to print set elements per line

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

 



Arturo Borrero Gonzalez <arturo@xxxxxxxxxx> wrote:
> Add a new option to nft to print set elements per line instead
> of all in a single line.
> This is useful when printing a ruleset with very big sets.
> 
> The new option is -t/--elements.
> 
> Annonymous sets/maps/concats are not affected by this. The default
> behaviour is not changed.

Nice patch, thanks Arturo!
Why make this an option in first place?

> % nft list ruleset -t -nn
> table ip t {
> 	set s {
> 		type inet_service
> 		elements = { 1,
> 				2,
> 				3,
> 				4,
> 				12345 }
> 	}

How hard would it be to make it so that this is still
printed in single line (enough space left)?

> 	set s2 {
> 		type ipv4_addr . inet_service
> 		elements = { 1.1.1.1 . 22,
> 				1.1.1.1 . 222,
> 				1.1.1.1 . 2222,
> 				2.1.1.1 . 22222 }
> 	}

But not this?

Printing all addresses in a single line is unreadable, it seems
strange to have an option to make it nice and then make 'unreadable'
the default :)
--
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