[PATCH 2/3] nwfilter: Display the pcap errror message

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

 



From: Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx>

Display the pcap error message in the log.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx>
---
 src/nwfilter/nwfilter_dhcpsnoop.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index de9c33b..7cb0ac0 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -1113,8 +1113,9 @@ virNWFilterSnoopDHCPOpen(const char *ifname, virMacAddr *mac,
     if (pcap_set_snaplen(handle, PCAP_PBUFSIZE) < 0 ||
         pcap_set_buffer_size(handle, PCAP_BUFFERSIZE) < 0 ||
         pcap_activate(handle) < 0) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("setup of pcap handle failed"));
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       _("setup of pcap handle failed: %s"),
+                       pcap_geterr(handle));
         goto cleanup;
     }
 
-- 
1.8.1.4

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