[PATCH] networkGetDHCPLeases: Remove unnecessary error reporting

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

 



Lack of a lease (whether mac is given or not) is a normal expected scenario.
There is no need to raise an error.

Signed-off-by: Nehal J Wani <nehaljw.kkd1@xxxxxxxxx>
---
 src/network/bridge_driver.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 29222d0..6a49a23 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3654,12 +3654,6 @@ networkGetDHCPLeases(virNetworkPtr network,
         VIR_FREE(lease);
     }
 
-    if (need_results && mac && !leases_ret) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("no lease with matching MAC address: %s"), mac);
-        goto error;
-    }
-
     if (leases_ret) {
         /* NULL terminated array */
         ignore_value(VIR_REALLOC_N(leases_ret, nleases + 1));
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]