Re: [RFC v3 PATCH 2/4] util: Add vlan support to virNetDevBridgeAddPort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The CI pipeline just found a minor problem - see below:

On 1/2/25 4:29 AM, Leigh Brown wrote:
Add virNetDevBridgeSetupVlans function to configures a bridge
interface using the passed virNetDevVlan struct.

Add virVlan parameter to the Linux version of virNetDevBridgeAddPort
and call virNetDevBridgeSetupVlans to set up the required vlan
configuration.

Update callers of virNetDevBridgeAddPort to pass NULL for now.

Signed-off-by: Leigh Brown <leigh@xxxxxxxxxxxxx>
---

[...]

diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index 5fd88f3195..80f028e9b7 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c

[...]

@@ -638,7 +704,8 @@ int virNetDevBridgeAddPort(const char *brname,
  }
  #else
  int virNetDevBridgeAddPort(const char *brname,
-                           const char *ifname)
+                           const char *ifname,
+                           const virNetDevVlan *virtVlan)

The last arg (virtVlan) needs a G_GNUC_UNUSED, otherwise the CI build fails for MacOS.


  {
      virReportSystemrror(ENOSYS,
                           _("Unable to add bridge %1$s port %2$s"), brname, ifname);
diff --git a/src/util/virnetdevbridge.h b/src/util/virnetdevbridge.h
index db4099bf0b..5f51656abe 100644
--- a/src/util/virnetdevbridge.h
+++ b/src/util/virnetdevbridge.h
@@ -20,6 +20,7 @@
#include "internal.h"
  #include "virmacaddr.h"
+#include "virnetdevvlan.h"
int virNetDevBridgeCreate(const char *brname,
                            const virMacAddr *mac)
@@ -28,7 +29,8 @@ int virNetDevBridgeDelete(const char *brname)
      ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeAddPort(const char *brname,
-                           const char *ifname)
+                           const char *ifname,
+                           const virNetDevVlan *virtVlan)
      ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeRemovePort(const char *brname,
diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
index 2701ba6dfc..a9573eb8e1 100644
--- a/src/util/virnetdevtap.c
+++ b/src/util/virnetdevtap.c
@@ -483,7 +483,7 @@ virNetDevTapAttachBridge(const char *tapname,
                  return -1;
          }
      } else {
-        if (virNetDevBridgeAddPort(brname, tapname) < 0)
+        if (virNetDevBridgeAddPort(brname, tapname, NULL) < 0)
              return -1;
if (isolatedPort == VIR_TRISTATE_BOOL_YES &&



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux