util/network: move viriptables.[ch] from util to network directory

These functions are only ever used by the network driver, and are so
specific to the network driver's usage of iptables that they likely
won't ever be used elsewhere. The files are renamed to
network_iptables.[ch] to be more in line with driver-specific file
naming conventions.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Laine Stump 2024-04-19 22:19:42 -04:00
parent 66b052263d
commit e1f6d2c205
7 changed files with 7 additions and 38 deletions

View File

@ -144,6 +144,7 @@ src/network/bridge_driver.c
src/network/bridge_driver_conf.c
src/network/bridge_driver_linux.c
src/network/leaseshelper.c
src/network/network_iptables.c
src/node_device/node_device_driver.c
src/node_device/node_device_udev.c
src/nwfilter/nwfilter_dhcpsnoop.c
@ -288,7 +289,6 @@ src/util/virhostmem.c
src/util/virhostuptime.c
src/util/viridentity.c
src/util/virinitctl.c
src/util/viriptables.c
src/util/viriscsi.c
src/util/virjson.c
src/util/virlease.c

View File

@ -2576,37 +2576,6 @@ virIdentitySetX509DName;
virInitctlFifos;
virInitctlSetRunLevel;
# util/viriptables.h
iptablesAddDontMasquerade;
iptablesAddForwardAllowCross;
iptablesAddForwardAllowIn;
iptablesAddForwardAllowOut;
iptablesAddForwardAllowRelatedIn;
iptablesAddForwardMasquerade;
iptablesAddForwardRejectIn;
iptablesAddForwardRejectOut;
iptablesAddOutputFixUdpChecksum;
iptablesAddTcpInput;
iptablesAddTcpOutput;
iptablesAddUdpInput;
iptablesAddUdpOutput;
iptablesRemoveDontMasquerade;
iptablesRemoveForwardAllowCross;
iptablesRemoveForwardAllowIn;
iptablesRemoveForwardAllowOut;
iptablesRemoveForwardAllowRelatedIn;
iptablesRemoveForwardMasquerade;
iptablesRemoveForwardRejectIn;
iptablesRemoveForwardRejectOut;
iptablesRemoveOutputFixUdpChecksum;
iptablesRemoveTcpInput;
iptablesRemoveTcpOutput;
iptablesRemoveUdpInput;
iptablesRemoveUdpOutput;
iptablesSetupPrivateChains;
# util/viriscsi.h
virISCSIConnectionLogin;
virISCSIConnectionLogout;

View File

@ -22,11 +22,11 @@
#include <config.h>
#include "virfile.h"
#include "viriptables.h"
#include "virstring.h"
#include "virlog.h"
#include "virfirewall.h"
#include "virfirewalld.h"
#include "network_iptables.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@ -2,6 +2,7 @@ network_driver_sources = [
'bridge_driver.c',
'bridge_driver_conf.c',
'bridge_driver_platform.c',
'network_iptables.c',
]
driver_source_files += files(network_driver_sources)

View File

@ -1,5 +1,5 @@
/*
* viriptables.c: helper APIs for managing iptables
* network_iptables.c: helper APIs for managing iptables in network driver
*
* Copyright (C) 2007-2014 Red Hat, Inc.
*
@ -27,13 +27,13 @@
#include <sys/stat.h>
#include "internal.h"
#include "viriptables.h"
#include "virfirewalld.h"
#include "virerror.h"
#include "virlog.h"
#include "virhash.h"
#include "network_iptables.h"
VIR_LOG_INIT("util.iptables");
VIR_LOG_INIT("network.iptables");
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@ -1,5 +1,5 @@
/*
* viriptables.h: helper APIs for managing iptables
* network_iptables.h: helper APIs for managing iptables in network driver
*
* Copyright (C) 2007, 2008 Red Hat, Inc.
*

View File

@ -46,7 +46,6 @@ util_sources = [
'virhostuptime.c',
'viridentity.c',
'virinitctl.c',
'viriptables.c',
'viriscsi.c',
'virjson.c',
'virkeycode.c',