Re: [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 2, 2021 at 7:46 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> 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: bb4052e57b5b ("audit: log nftables configuration change events once per table")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  net/netfilter/nf_tables_api.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Dan.

Reviewed-by: Paul Moore <paul@xxxxxxxxxxxxxx>

> diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
> index 42bf3e15065a..2fb2ccf87011 100644
> --- a/net/netfilter/nf_tables_api.c
> +++ b/net/netfilter/nf_tables_api.c
> @@ -8022,7 +8022,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++;
> --
> 2.30.2

-- 
paul moore
www.paul-moore.com



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux