netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to have a dynamic ingress device(s) list?
@ 2024-04-24 18:03 William N.
  2024-04-24 18:49 ` Kerin Millar
  0 siblings, 1 reply; 7+ messages in thread
From: William N. @ 2024-04-24 18:03 UTC (permalink / raw)
  To: netfilter

Hi,

I am trying to do this:

# dynamic list, updated through a bash script:
define $nics = { "nic1", "nic5", ... } 

# ...
chain foo {
	type filter hook ingress devices = $nics priority -500
	# ...
}

The problems I am facing:

1. It seems the perfect solution I was hoping for is not possible:

devices = "nic*"

2. If there is only one device (e.g. "nic7"), the syntax requires:

device "nic7" # not 'devices' and no '='

Trying something like devices = "nic7" results in a segmentation fault.

3. Adding/removing a separate chain for each nic dynamically seems to
me less efficient, i.e. I am trying to avoid it if possible.


What is the right way to do this?

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

end of thread, other threads:[~2024-04-25 15:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24 18:03 How to have a dynamic ingress device(s) list? William N.
2024-04-24 18:49 ` Kerin Millar
2024-04-24 19:20   ` William N.
2024-04-24 23:25     ` Kerin Millar
2024-04-25 14:12       ` William N.
2024-04-25 14:22         ` Kerin Millar
2024-04-25 15:30           ` William N.

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).