From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Elise Lennion <elise.lennion@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v4] datatype: Replace getnameinfo() by internal lookup table
Date: Wed, 30 Nov 2016 20:11:54 +0100 [thread overview]
Message-ID: <20161130191154.GA9121@salvia> (raw)
In-Reply-To: <20161130011236.GA11108@lennorien.com>
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!
prev parent reply other threads:[~2016-11-30 19:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 1:12 [PATCH nft v4] datatype: Replace getnameinfo() by internal lookup table Elise Lennion
2016-11-30 19:11 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161130191154.GA9121@salvia \
--to=pablo@netfilter.org \
--cc=elise.lennion@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).