mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 22:05:47 +00:00
nwfilter: Display the pcap errror message
Display the pcap error message in the log. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
a718eb19e3
commit
64df4c7518
@ -1113,8 +1113,9 @@ virNWFilterSnoopDHCPOpen(const char *ifname, virMacAddr *mac,
|
|||||||
if (pcap_set_snaplen(handle, PCAP_PBUFSIZE) < 0 ||
|
if (pcap_set_snaplen(handle, PCAP_PBUFSIZE) < 0 ||
|
||||||
pcap_set_buffer_size(handle, PCAP_BUFFERSIZE) < 0 ||
|
pcap_set_buffer_size(handle, PCAP_BUFFERSIZE) < 0 ||
|
||||||
pcap_activate(handle) < 0) {
|
pcap_activate(handle) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("setup of pcap handle failed"));
|
_("setup of pcap handle failed: %s"),
|
||||||
|
pcap_geterr(handle));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user