On Tue, Feb 10, 2026 at 11:16:26AM +0100, Dion Bosschieter wrote:
> Introduce nwfilter_tech_driver.c which holds shared non driver specific
> methods.
> The following logic can be reused by new nwfilter drivers, which are not
> ebiptables specific:
> - data type print logic, used for constructing ascii cli arguments out
>   of nwfilter data;
> - chain jump proto type l3_proto_idx logic;
> - virNWFilterRule sorting.
> 
> Signed-off-by: Dion Bosschieter <[email protected]>
> ---
>  src/nwfilter/meson.build                  |   1 +
>  src/nwfilter/nwfilter_ebiptables_driver.c | 263 +---------------------
>  src/nwfilter/nwfilter_tech_driver.c       | 250 ++++++++++++++++++++
>  src/nwfilter/nwfilter_tech_driver.h       |  52 ++++-
>  4 files changed, 301 insertions(+), 265 deletions(-)
>  create mode 100644 src/nwfilter/nwfilter_tech_driver.c

nwfilter_tech_driver.c should have been added to po/POTFILES
in this patch, so 'ninja test' still works.

> diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c 
> b/src/nwfilter/nwfilter_ebiptables_driver.c
> index c7f6141cd9..6769a2fb42 100644
> --- a/src/nwfilter/nwfilter_ebiptables_driver.c
> +++ b/src/nwfilter/nwfilter_ebiptables_driver.c
> @@ -25,7 +25,6 @@
>  #include <unistd.h>
>  #include <sys/stat.h>
>  #include <fcntl.h>
> -#include <sys/utsname.h>

Pre-existing bug that could be in its own patch.


> diff --git a/src/nwfilter/nwfilter_tech_driver.h 
> b/src/nwfilter/nwfilter_tech_driver.h
> index a4af0bf6d5..8f9d605529 100644
> --- a/src/nwfilter/nwfilter_tech_driver.h
> +++ b/src/nwfilter/nwfilter_tech_driver.h
> @@ -24,9 +24,7 @@
>  #pragma once
>  
>  #include "virnwfilterobj.h"
> -
> -typedef struct _virNWFilterTechDriver virNWFilterTechDriver;
> -
> +#include "virstring.h"

virstring.h is only needed in the C file.


With those changes

  Reviewed-by: Daniel P. Berrangé <[email protected]>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|

Reply via email to