]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util/network: move viriptables.[ch] from util to network directory
authorLaine Stump <laine@redhat.com>
Sat, 20 Apr 2024 02:19:42 +0000 (22:19 -0400)
committerLaine Stump <laine@redhat.com>
Thu, 23 May 2024 03:19:18 +0000 (23:19 -0400)
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>
po/POTFILES
src/libvirt_private.syms
src/network/bridge_driver_linux.c
src/network/meson.build
src/network/network_iptables.c [moved from src/util/viriptables.c with 99% similarity]
src/network/network_iptables.h [moved from src/util/viriptables.h with 99% similarity]
src/util/meson.build

index cec7e4abf449b12a268d1fffb74992291791a43b..0542d342d64a6c0484d54dcc5caafd3fffedf8f1 100644 (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
index 1c8f3f902d17efaeba1b4805cce248beca6cd244..b006b842627fc09d1fdacc723ed6bfbb8a061ac3 100644 (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;
index b8893bfed2a52a117820c9df1baf3185cabc0b83..fd4bf7b61c630942d0ff8709a7c272fe5d27aee0 100644 (file)
 #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
 
index eb171ae7796a5655af1a666e8640eab65f2b1c36..305e2d52fbeb4159aedb6c74b8f17e9f9e1df65b 100644 (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)
similarity index 99%
rename from src/util/viriptables.c
rename to src/network/network_iptables.c
index 018021bc1b4ed983201159ab022e513cbbaa7d19..362c0202a0f791f45de8a2912930cd9c1c185bbe 100644 (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.
  *
 #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
 
similarity index 99%
rename from src/util/viriptables.h
rename to src/network/network_iptables.h
index bb13f3292d9c44145abd05050e6fc8951df8dd06..bfb6bbe0e74ee13a6ecd2f5c525eb5c66ad644d8 100644 (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.
  *
index c2175f10986e317629ca2ece8ef5db6f224139f7..896c79515034e40483aca7274c1330299c482e33 100644 (file)
@@ -46,7 +46,6 @@ util_sources = [
   'virhostuptime.c',
   'viridentity.c',
   'virinitctl.c',
-  'viriptables.c',
   'viriscsi.c',
   'virjson.c',
   'virkeycode.c',