All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about security table priority in iptables-nft
@ 2026-09-19 12:42 js yu
  2026-09-19 13:33 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: js yu @ 2026-09-19 12:42 UTC (permalink / raw)
  To: netfilter

Hi,

I have a question about the priority used for the security table
by the iptables-nft backend.

In iptables/nft.c (v1.8.13), the built-in security chains use:

.prio = 150, /* NF_IP_PRI_SECURITY */

However, NF_IP_PRI_SECURITY is defined as 50 in the kernel,
and iptables-legacy uses that value for its security table.

As far as I understand, this results in the following relative
ordering within the INPUT hook:

iptables-legacy:
    filter (0)
    security (50)
    nat INPUT (100)

iptables-nft:
    filter (0)
    nat INPUT (100)
    security (150)

Is my understanding correct?

If so, could someone explain why iptables-nft uses priority 150
for the security table instead of 50? Is there a historical or
implementation reason for this difference, or am I missing
something about how these priorities are applied?

Source:
https://git.netfilter.org/iptables/tree/iptables/nft.c?h=v1.8.13

Thanks.

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

* Re: Question about security table priority in iptables-nft
  2026-09-19 12:42 Question about security table priority in iptables-nft js yu
@ 2026-09-19 13:33 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2026-09-19 13:33 UTC (permalink / raw)
  To: js yu; +Cc: netfilter

js yu <junsang.yu3@gmail.com> wrote:
> 
> In iptables/nft.c (v1.8.13), the built-in security chains use:
> 
> .prio = 150, /* NF_IP_PRI_SECURITY */
> 
> However, NF_IP_PRI_SECURITY is defined as 50 in the kernel,
> and iptables-legacy uses that value for its security table.

Yes, looks like a bug.  I pushed a change to correct this, thanks
for reporting.

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

end of thread, other threads:[~2026-09-19 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-19 12:42 Question about security table priority in iptables-nft js yu
2026-09-19 13:33 ` Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.