|
|
c401cc |
From 219c91bc23fbe762142736b3621bf10853a83b67 Mon Sep 17 00:00:00 2001
|
|
|
c401cc |
Message-Id: <219c91bc23fbe762142736b3621bf10853a83b67@dist-git>
|
|
|
c401cc |
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
|
c401cc |
Date: Thu, 20 Mar 2014 00:06:18 -0600
|
|
|
c401cc |
Subject: [PATCH] nwfilter: Display pcap's error message when pcap setup fails
|
|
|
c401cc |
|
|
|
c401cc |
https://bugzilla.redhat.com/show_bug.cgi?id=1078347
|
|
|
c401cc |
|
|
|
c401cc |
Display the pcap error message in the log.
|
|
|
c401cc |
|
|
|
c401cc |
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
|
c401cc |
|
|
|
c401cc |
(cherry picked from commit 64df4c75189b42799f82a8d8816c7c55598d2b6e)
|
|
|
c401cc |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c401cc |
---
|
|
|
c401cc |
src/nwfilter/nwfilter_dhcpsnoop.c | 5 +++--
|
|
|
c401cc |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
c401cc |
|
|
|
c401cc |
diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
|
|
|
c401cc |
index 0b0eb47..e7dd4fa 100644
|
|
|
c401cc |
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
|
|
|
c401cc |
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
|
|
|
c401cc |
@@ -1116,8 +1116,9 @@ virNWFilterSnoopDHCPOpen(const char *ifname, virMacAddr *mac,
|
|
|
c401cc |
if (pcap_set_snaplen(handle, PCAP_PBUFSIZE) < 0 ||
|
|
|
c401cc |
pcap_set_buffer_size(handle, PCAP_BUFFERSIZE) < 0 ||
|
|
|
c401cc |
pcap_activate(handle) < 0) {
|
|
|
c401cc |
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
|
c401cc |
- _("setup of pcap handle failed"));
|
|
|
c401cc |
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
c401cc |
+ _("setup of pcap handle failed: %s"),
|
|
|
c401cc |
+ pcap_geterr(handle));
|
|
|
c401cc |
goto cleanup;
|
|
|
c401cc |
}
|
|
|
c401cc |
|
|
|
c401cc |
--
|
|
|
c401cc |
1.9.1
|
|
|
c401cc |
|