Re: [PATCH nft v4] datatype: Replace getnameinfo() by internal lookup table

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

 



On Tue, Nov 29, 2016 at 11:12:37PM -0200, Elise Lennion wrote:
> To avoid exceeding the inputs number limit of the flex scanner used,
> when calling getnameinfo() in inet_service_type_print().
> 
> The new symbol_table was associated with inet_service_type, to enable
> listing all pre-defined services using nft command line tool.
> 
> The listed services are all well-known and registered ports of my
> local /etc/services file, from Ubuntu 16.04. Service numbers are
> converted to respect network byte order.

Applied, thanks Elise.

BTW, we have to fix "nft describe", look:

 # nft describe tcp dport
 payload expression, datatype inet_service (internet network service) (basetype integer), 16 bits

 pre-defined symbolic constants:
        tcpmux                          0x0100
        echo                            0x0700
        ...

The user relies on nft describe to know what datatype and possible
values are possible for a given selector. In this case, they are
expressed in network byte order.

The problems seems to be in expr_describe(), the expression already
provides the byteorder, so I guess symbol_table_print() needs to get
this byteorder as parameter to swap bytes when required.

This is a fix, so I would appreciate if you focus on this, 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