Since literal option is supposed to be a level, matching for equality is
not correct here since the level may be higher than NFT_LITERAL_PORT.
This fixes for ports being printed numerically if '-l' option was given
twice.
Fixes: b0f6a45b25dd1 ("src: add --literal option")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
void inet_service_type_print(const struct expr *expr, struct output_ctx *octx)
{
- if (octx->literal == NFT_LITERAL_PORT) {
+ if (octx->literal >= NFT_LITERAL_PORT) {
inet_service_print(expr, octx);
return;
}