Linux Netfilter discussions
 help / color / mirror / Atom feed
* base chains with same hook, same priority
@ 2021-09-15  9:38 Cristian Constantin
  2021-09-15 11:44 ` Cristian Constantin
  0 siblings, 1 reply; 3+ messages in thread
From: Cristian Constantin @ 2021-09-15  9:38 UTC (permalink / raw)
  To: netfilter

hi!

quote from the wiki page:

https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains

"[...] It's possible to give two base chains the same priority, but
there is no guaranteed evaluation order of base chains with identical
priority that are attached to the same hook location."
I have tested this on my system and it is actually allowed by `nft`, kernel.

root@firiel:/home/cco# uname -a
Linux firiel 5.8.0-63-generic #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC
2021 x86_64 x86_64 x86_64 GNU/Linux
root@firiel:/home/cco# lsb_release
LSB Version: core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
root@firiel:/home/cco# nft -v
nftables v0.9.6 (Capital Idea #2)
root@firiel:/home/cco# nft -a list table filter
table ip filter { # handle 3
chain INPUT { # handle 1
type filter hook input priority filter; policy accept;
}
...
chain TEST { # handle 579
type filter hook input priority filter; policy accept;
}

could someone please show me a use case for using multiple chains
having the same hook and the same priority? (i.e. taking into account
that _most of the time_ rule priority and thus evaluation order is
important)

and, in a more general sense, why is this configuration allowed (i.e.
base chains with same hook, same priority)?

thanks,
cristian

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

end of thread, other threads:[~2021-09-30 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-15  9:38 base chains with same hook, same priority Cristian Constantin
2021-09-15 11:44 ` Cristian Constantin
2021-09-30 14:02   ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox