From 23870dffcd26ba4d89c869a11fddb00cc3a3e6fc Mon Sep 17 00:00:00 2001 From: Nepomuk Crhonek <105591323+Nepomuk5665@users.noreply.github.com> Date: Sat, 24 Jan 2026 00:11:31 +0100 Subject: [PATCH] cli: fix incorrect hookopts field check in chain dump The condition for printing priorities in bfc_chain_dump() incorrectly checked BF_HOOKOPTS_FAMILY instead of BF_HOOKOPTS_PRIORITIES. This was likely a copy-paste error from the preceding condition block. This bug caused: 1. Priorities not being printed when only BF_HOOKOPTS_PRIORITIES was set 2. Priorities being printed (with potentially invalid values) when only BF_HOOKOPTS_FAMILY was set --- src/bfcli/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bfcli/print.c b/src/bfcli/print.c index 2add68ff..945c3144 100644 --- a/src/bfcli/print.c +++ b/src/bfcli/print.c @@ -124,7 +124,7 @@ void bfc_chain_dump(struct bf_chain *chain, struct bf_hookopts *hookopts, need_comma = true; } - if (bf_hookopts_is_used(hookopts, BF_HOOKOPTS_FAMILY)) { + if (bf_hookopts_is_used(hookopts, BF_HOOKOPTS_PRIORITIES)) { (void)fprintf(stdout, "%spriorities=%d-%d", need_comma ? "," : "", hookopts->priorities[0], hookopts->priorities[1]); need_comma = true;