summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-04-02 14:45:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 12:38:22 +0300
commitf3d0db3b435a7216d3082c4ddea95f5de4726854 (patch)
tree57731a47ec41b0a1d9563ba662adee3a36362fb1 /net/netfilter
parent059f47b3a433b768135618b6a947084ed9876550 (diff)
downloadlinux-f3d0db3b435a7216d3082c4ddea95f5de4726854.tar.xz
netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()
commit dadf33c9f6b5f694e842d224a4d071f59ac665ee upstream. The first argument of a WARN_ONCE() is a condition. This WARN_ONCE() will only print the table name, and is potentially problematic if the table name has a %s in it. Fixes: c520292f29b8 ("audit: log nftables configuration change events once per table") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index e638e7380e79..996f2a90a12c 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7828,7 +7828,7 @@ static void nf_tables_commit_audit_collect(struct list_head *adl,
if (adp->table == table)
goto found;
}
- WARN_ONCE("table=%s not expected in commit list", table->name);
+ WARN_ONCE(1, "table=%s not expected in commit list", table->name);
return;
found:
adp->entries++;