]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
rule: do not hardcode ingress when printing flowtable
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 25 Apr 2018 16:50:26 +0000 (18:50 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 26 Apr 2018 15:56:06 +0000 (17:56 +0200)
Call hook number to string function instead.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/rule.c

index f8a27570ad6a8c26dc81a28d0f18fbebb2c321d7..5693888c31db97dbe619afa7350e5f8c6310bf42 100644 (file)
@@ -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);