From: Pablo Neira Ayuso Date: Wed, 25 Apr 2018 16:50:26 +0000 (+0200) Subject: rule: do not hardcode ingress when printing flowtable X-Git-Tag: v0.8.4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c065d690e6f443d9b4ee7147a063cd80628c3a24;p=thirdparty%2Fnftables.git rule: do not hardcode ingress when printing flowtable Call hook number to string function instead. Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/rule.c b/src/rule.c index f8a27570..5693888c 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);