Corubba Smith <corubba@xxxxxx> wrote: > The new namespace helper provides an internal stable interface for > plugins to use for switching various linux namespaces. Currently only > network namespaces are supported/implemented, but can easily be extended > if needed. autoconf will enable it automatically if the required symbols > are available. If ulogd is compiled without namespace support, the > functions will simply return an error, there is no need for conditional > compilation or special handling in plugin code. > > Signed-off-by: Corubba Smith <corubba@xxxxxx> Looks good to me, I intend to apply this later this week unless there are objections. > and NFACCT plugins. I skipped ULOG because it's removed from the > kernel since 7200135bc1e6 ("netfilter: kill ulog targets") aka v3.17 Yeah, ULOG code should just be axed, there is no point in carrying this in the tree anymore. > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -6,6 +6,7 @@ AM_CPPFLAGS += -DULOGD_CONFIGFILE='"$(sysconfdir)/ulogd.conf"' \ > > sbin_PROGRAMS = ulogd > > -ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c addr.c > +ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c \ > + addr.c namespace.c > ulogd_LDADD = ${libdl_LIBS} ${libpthread_LIBS} > ulogd_LDFLAGS = -export-dynamic > diff --git a/src/namespace.c b/src/namespace.c > new file mode 100644 > index 0000000..f9f23d4 > --- /dev/null > +++ b/src/namespace.c > @@ -0,0 +1,237 @@ > +/* namespace helper > + * > + * userspace logging daemon for the netfilter subsystem > + * > + * (C) 2025 The netfilter project > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 > + * as published by the Free Software Foundation. I intend to replace all of this with /* SPDX-License-Identifier: GPL-2.0 */ No need for license boilerplate, IMO.