[libvirt PATCH 04/17] network: assume DNSMASQ_DHCPv6_SUPPORT

Ján Tomko jtomko at redhat.com
Tue Dec 14 19:09:20 UTC 2021


Remove the (now unreachable) error message and the macro.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/network/bridge_driver.c | 14 --------------
 src/util/virdnsmasq.h       |  6 ------
 2 files changed, 20 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 40dccf2c15..526485e3f9 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1329,20 +1329,6 @@ networkDnsmasqConfContents(virNetworkObj *obj,
         }
         if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET6)) {
             if (ipdef->nranges || ipdef->nhosts) {
-                if (!DNSMASQ_DHCPv6_SUPPORT(caps)) {
-                    unsigned long version = dnsmasqCapsGetVersion(caps);
-                    virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                   _("The version of dnsmasq on this host "
-                                     "(%d.%d) doesn't adequately support "
-                                     "IPv6 dhcp range or dhcp host "
-                                     "specification. Version %d.%d or later "
-                                     "is required."),
-                                   (int)version / 1000000,
-                                   (int)(version % 1000000) / 1000,
-                                   DNSMASQ_DHCPv6_MAJOR_REQD,
-                                   DNSMASQ_DHCPv6_MINOR_REQD);
-                    return -1;
-                }
                 if (ipv6def) {
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                                    _("For IPv6, multiple DHCP definitions "
diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h
index ee9839cd25..92c5d4129d 100644
--- a/src/util/virdnsmasq.h
+++ b/src/util/virdnsmasq.h
@@ -107,15 +107,9 @@ unsigned long dnsmasqCapsGetVersion(dnsmasqCaps *caps);
 char *dnsmasqDhcpHostsToString(dnsmasqDhcpHost *hosts,
                                unsigned int nhosts);
 
-#define DNSMASQ_DHCPv6_MAJOR_REQD 2
-#define DNSMASQ_DHCPv6_MINOR_REQD 64
 #define DNSMASQ_RA_MAJOR_REQD 2
 #define DNSMASQ_RA_MINOR_REQD 64
 
-#define DNSMASQ_DHCPv6_SUPPORT(CAPS) \
-    (dnsmasqCapsGetVersion(CAPS) >= \
-     (DNSMASQ_DHCPv6_MAJOR_REQD * 1000000) + \
-     (DNSMASQ_DHCPv6_MINOR_REQD * 1000))
 #define DNSMASQ_RA_SUPPORT(CAPS) \
     (dnsmasqCapsGetVersion(CAPS) >= \
      (DNSMASQ_RA_MAJOR_REQD * 1000000) + \
-- 
2.31.1




More information about the libvir-list mailing list