All of lore.kernel.org
 help / color / mirror / Atom feed
* ebtables: load-on-demand extensions
@ 2020-06-16 14:48 Eugene Crosser
  2020-06-16 15:21 ` Jan Engelhardt
  0 siblings, 1 reply; 16+ messages in thread
From: Eugene Crosser @ 2020-06-16 14:48 UTC (permalink / raw)
  To: netfilter-devel


[-- Attachment #1.1: Type: text/plain, Size: 1767 bytes --]

Hello all,

we need a custom "extention" module working on Layer 2 (nfproto "bridge"
or "netdev"). Making a kernel module and an xtables "extention" shared
object is simple enough. But then it gets more complicated.

In order to make an "extention" work on Layer 3 (with command
`iptables`) it is sufficient to place the shared object in the directory
with other existing extensions (/usr/lib/x86_64-linux-gnu/xtables in a
typical linux distro), and then existing `iptables` command will load it
on demand if it was specified as a "match extension" option `-m` or used
as a jump target. (Existing third party tools such as iptables-netflow
use this approach).

However such "load on demand" mechanism does not exist for Layer 2
(`ebtables` command). Instead, `ebtables` has a hardcoded list of
extensions that are all loaded at startup time (iptables/xtables-eb.c,
function `ebt_load_match_extensions()`). This makes the use of in-house
extensions impossible without rolling out a modified version of
`ebtables` command.

Questions:

1. Is my analysis correct, and it is not possible to use existing
netfilter control tools to configure and enable custom extensions on
layer 2?

2. Is it correct that "new generation" `nft` filtering infrastructure
does not support dynamically loadable extensions at all? (We need a
custom kernel module because we need access to the fields in the skb
that are not exposed to `nft`, and we need a custom extension to
configure the custom module.)

3. If modification to `ebtables` is indeed inevitable, and we make such
modification to allow on demand loading the same way as in `iptables`,
would upstream be interested to incorporate such patch for some future
relase?

Thank you,

Eugene


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2020-06-22  7:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 14:48 ebtables: load-on-demand extensions Eugene Crosser
2020-06-16 15:21 ` Jan Engelhardt
2020-06-16 15:54   ` Eugene Crosser
2020-06-16 16:33     ` Jan Engelhardt
2020-06-19 13:45       ` Eugene Crosser
2020-06-19 15:15         ` Pablo Neira Ayuso
2020-06-19 16:21           ` Eugene Crosser
2020-06-20 10:34           ` Expose skb_gso_validate_network_len() [Was: ebtables: load-on-demand extensions] Eugene Crosser
2020-06-20 11:04             ` Florian Westphal
2020-06-20 21:16               ` Eugene Crosser
2020-06-21  3:24                 ` Florian Westphal
2020-06-21 10:03                   ` Jan Engelhardt
2020-06-21 18:48                     ` Eugene Crosser
2020-06-21 23:52                     ` Florian Westphal
2020-06-22  4:50                       ` Jan Engelhardt
2020-06-22  7:41                         ` Eugene Crosser

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.