]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nwfilter: Display the pcap errror message
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Mon, 3 Mar 2014 20:13:47 +0000 (15:13 -0500)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 3 Mar 2014 20:13:47 +0000 (15:13 -0500)
Display the pcap error message in the log.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
src/nwfilter/nwfilter_dhcpsnoop.c

index de9c33b60f7ce1d64e2c561e315760e837073416..7cb0ac07732e774addf025572d213e262ab4fd4c 100644 (file)
@@ -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;
     }