From baa4e0e3fa5ff9ad6e3c97b0347ad23058c545d9 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 29 Oct 2018 14:04:07 +0100 Subject: src: add NFT_CTX_OUTPUT_NUMERIC_PROTO We keep printing layer 4 protocols as literals since we do not use /etc/protocols. This new flag allows us to print it as a number. libnftables internally uses this to print layer 4 protocol as numbers when part of a range. Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/expression.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/expression.c') diff --git a/src/expression.c b/src/expression.c index 25883ea7..5ff469c5 100644 --- a/src/expression.c +++ b/src/expression.c @@ -663,6 +663,7 @@ static void range_expr_print(const struct expr *expr, struct output_ctx *octx) unsigned int flags = octx->flags; octx->flags &= ~NFT_CTX_OUTPUT_SERVICE; + octx->flags |= NFT_CTX_OUTPUT_NUMERIC_PROTO; expr_print(expr->left, octx); nft_print(octx, "-"); expr_print(expr->right, octx); -- cgit v1.2.3