Re: [nft PATCH] json: Fix compile error

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

 



On Mon, Sep 10, 2018 at 02:56:48PM +0200, Phil Sutter wrote:
> Hi,
> 
> On Wed, Aug 29, 2018 at 02:19:22AM +0200, Pablo Neira Ayuso wrote:
> > On Tue, Aug 28, 2018 at 10:26:56PM +0200, Phil Sutter wrote:
> > > Unless there are objections, I will later follow-up with a patch to
> > > convert remaining human readable values into numeric ones in JSON
> > > regardless of numeric output or not. This is just a quick fix to unbreak
> > > the build.
> > 
> > Please, go ahead.
> 
> After making the changes and looking at the results, I'm not so sure
> anymore whether it really is a good idea: It means no symbol table
> lookups are done anymore, possibly exposing internal or at least not
> well-known values. A few examples are:
> 
> * NFT_REJECT_ICMPX_*, which are unrelated to ICMP/ICMPv6 codes.
> * RTN_*, declared without explicit value in rtnetlink.h.
> * NFPROTO_*, similar but unrelated to ETHERTYPE_*.
> * ct states, calculated from IP_CT_*
> 
> What are your thoughts, should I still perform the changes or maybe
> rather just fix inet_service_type_json() to make it consistent with
> inet_service_type_print() again?

I think built-in definition should still remain strings, while
anything else that is user-defined, including
inet_service_type_print() which depends on /etc/services, should
default on numeric values.

Question here is if you consider it useful to get json in sync with
human-readable output and the new -l options which explicitly requests
literal values to be printed. I'm ambivalent regarding behaviour or
json and -l.



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

  Powered by Linux