That was defined as:
/*
* libpcap 1.5 requires a 128kb buffer
* 128 kb is bigger than (DHCP_PKT_BURST * PCAP_PBUFSIZE / 2)
*/
# define PCAP_BUFFERSIZE (128 * 1024)
Maybe with more modern libpcap that is not needed or even wrong now.
I have 1.8.1 atm.
Ok, repro with local build works.
I tested the buffer sized, the other calls that pcap_open_live does and so on.
Eventually I minimized the changes and found the issue to go away with:
diff --git a/src/nwfilter/ nwfilter_ dhcpsnoop. c b/src/nwfilter/ nwfilter_ dhcpsnoop. c nwfilter_ dhcpsnoop. c nwfilter_ dhcpsnoop. c pDHCPOpen( const char *ifname, virMacAddr *mac,
index 6069e70..c12ba9c 100644
--- a/src/nwfilter/
+++ b/src/nwfilter/
@@ -1115,7 +1115,6 @@ virNWFilterSnoo
}
if (pcap_set_ snaplen( handle, PCAP_PBUFSIZE) < 0 || buffer_ size(handle, PCAP_BUFFERSIZE) < 0 ||
pcap_ activate( handle) < 0) {
virReportErro r(VIR_ERR_ INTERNAL_ ERROR,
_("setup of pcap handle failed: %s"),
- pcap_set_
That was defined as:
/*
* libpcap 1.5 requires a 128kb buffer
* 128 kb is bigger than (DHCP_PKT_BURST * PCAP_PBUFSIZE / 2)
*/
# define PCAP_BUFFERSIZE (128 * 1024)
Maybe with more modern libpcap that is not needed or even wrong now.
I have 1.8.1 atm.