diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-30 23:03:46 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-30 23:09:57 +0100 |
commit | 3b7a8a102c076eb015cf779613b06458d3d420b8 (patch) | |
tree | 3338271eabb9ffc2d52970dd9cfd319b0b87e433 /src | |
parent | 53a0bd44d336f54f26f3364eb075e91d91e4782e (diff) |
datatype: honor -nn option from inet_service_type_print()
If -nn is passed, we have to display ports in numbers, not as a symbol.
Fixes: ccc5da470e76 ("datatype: Replace getnameinfo() by internal lookup table")
Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/datatype.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/datatype.c b/src/datatype.c index c92f9276..b5d73bc0 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -559,6 +559,10 @@ const struct datatype inet_protocol_type = { static void inet_service_type_print(const struct expr *expr) { + if (numeric_output >= NUMERIC_PORT) { + integer_type_print(expr); + return; + } symbolic_constant_print(&inet_service_tbl, expr, false); } |