The virtnwfilterd daemon will be responsible for providing the nwfilter API
driver functionality. The nwfilter driver is still loaded by the main
libvirtd daemon at this stage, so virtnwfilterd must not be running at
the same time.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitignore | 1 +
libvirt.spec.in | 1 +
src/nwfilter/Makefile.inc.am | 14 ++++++++++++++
3 files changed, 16 insertions(+)
diff --git a/.gitignore b/.gitignore
index d8dd7ab5e4..6c46e8ae19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -167,6 +167,7 @@
/src/virtlogd
/src/virtnetworkd
/src/virtnodedevd
+/src/virtnwfilterd
/src/virtsecretd
/src/virtstoraged
/src/virt-guest-shutdown.target
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8904d1a28f..8e31588001 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1600,6 +1600,7 @@ exit 0
%{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
%files daemon-driver-nwfilter
+%attr(0755, root, root) %{_sbindir}/virtnwfilterd
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
%ghost %dir %{_localstatedir}/run/libvirt/network/
%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am
index 810ca54bcc..c5ada0d420 100644
--- a/src/nwfilter/Makefile.inc.am
+++ b/src/nwfilter/Makefile.inc.am
@@ -41,4 +41,18 @@ libvirt_driver_nwfilter_impl_la_LIBADD = \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
+
+sbin_PROGRAMS += virtnwfilterd
+
+virtnwfilterd_SOURCES = $(REMOTE_DAEMON_SOURCES)
+virtnwfilterd_CFLAGS = \
+ $(REMOTE_DAEMON_CFLAGS) \
+ -DSOCK_NAME="\"virtnwfilterd-sock\"" \
+ -DSOCK_NAME_RO="\"virtnwfilterd-sock-ro\"" \
+ -DSOCK_NAME_ADMIN="\"virtnwfilterd-admin-sock\"" \
+ -DDAEMON_NAME="\"virtnwfilterd\"" \
+ -DMODULE_NAME="\"nwfilter\"" \
+ $(NULL)
+virtnwfilterd_LDFLAGS = $(REMOTE_DAEMON_LDFLAGS)
+virtnwfilterd_LDADD = $(REMOTE_DAEMON_LDADD)
endif WITH_NWFILTER
--
2.21.0