netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Element-Level Logging Support in nftables Sets
@ 2025-06-26  4:27 sontu mazumdar
  2025-06-28 12:30 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: sontu mazumdar @ 2025-06-26  4:27 UTC (permalink / raw)
  To: netfilter

Hi Everyone,

I am exploring whether it's possible to add logging support at the
element level within an nftables set. Specifically, I'm looking for
functionality where an individual element in a set can trigger a log
when it's matched—something like the following:

table inet mytable {
set s {
typeof ip saddr
counter
elements = { 1.1.1.1 log prefix "element1" level info,
                     1.1.1.3 log prefix "element2" level info }
        }
}

I understand that nftables sets currently do not support logging at
the element level. Is there any plan to introduce this feature in
future releases?

Regards,
Sontu

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Element-Level Logging Support in nftables Sets
  2025-06-26  4:27 Element-Level Logging Support in nftables Sets sontu mazumdar
@ 2025-06-28 12:30 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2025-06-28 12:30 UTC (permalink / raw)
  To: sontu mazumdar; +Cc: netfilter

sontu mazumdar <sontu21@gmail.com> wrote:
> I am exploring whether it's possible to add logging support at the
> element level within an nftables set. Specifically, I'm looking for
> functionality where an individual element in a set can trigger a log
> when it's matched—something like the following:
> 
> table inet mytable {
> set s {
> typeof ip saddr
> counter
> elements = { 1.1.1.1 log prefix "element1" level info,
>                      1.1.1.3 log prefix "element2" level info }
>         }
> }

Could be done, however, typically "log" is combined with "limit" to
prevent log flooding.

> I understand that nftables sets currently do not support logging at
> the element level. Is there any plan to introduce this feature in
> future releases?

Not that I know of.  Whats your use case?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-28 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-26  4:27 Element-Level Logging Support in nftables Sets sontu mazumdar
2025-06-28 12:30 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).