diff mbox series

[nft,2/2] rule: do not hardcode ingress when printing flowtable

Message ID 20180426155131.19009-2-pablo@netfilter.org
State Accepted
Delegated to: Pablo Neira
Headers show
Series [nft,1/2] evaluate: missing flowtable evaluation from nested notation | expand

Commit Message

Pablo Neira Ayuso April 26, 2018, 3:51 p.m. UTC
Call hook number to string function instead.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/rule.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/rule.c b/src/rule.c
index e0e06c523241..589bf21ac4d3 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1637,7 +1637,8 @@  static void flowtable_print_declaration(const struct flowtable *flowtable,
 	nft_print(octx, " %s {%s", flowtable->handle.flowtable, opts->nl);
 
 	nft_print(octx, "%s%shook %s priority %d%s",
-		  opts->tab, opts->tab, "ingress",
+		  opts->tab, opts->tab,
+		  hooknum2str(NFPROTO_NETDEV, flowtable->hooknum),
 		  flowtable->priority, opts->stmt_separator);
 
 	nft_print(octx, "%s%sdevices = { ", opts->tab, opts->tab);