]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nwfilter: Increase buffer size for libpcap
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Mon, 3 Mar 2014 20:13:50 +0000 (15:13 -0500)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 3 Mar 2014 20:13:50 +0000 (15:13 -0500)
Libpcap 1.5 requires a larger buffer than previous pcap versions.
Adjust the size of the buffer to 128kb.

This patch should address symptoms in BZ 1071181 and BZ 731059

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

index 7cb0ac07732e774addf025572d213e262ab4fd4c..ab9bf09fcd9e18a845e8c04b8380117ec65d03e6 100644 (file)
@@ -250,7 +250,11 @@ struct _virNWFilterDHCPDecodeJob {
 # define DHCP_PKT_BURST         50 /* pkts/sec */
 # define DHCP_BURST_INTERVAL_S  10 /* sec */
 
-# define PCAP_BUFFERSIZE        (DHCP_PKT_BURST * PCAP_PBUFSIZE / 2)
+/*
+ * libpcap 1.5 requires a 128kb buffer
+ * 128 kb is bigger than (DHCP_PKT_BURST * PCAP_PBUFSIZE / 2)
+ */
+# define PCAP_BUFFERSIZE        (128 * 1024)
 
 # define MAX_QUEUED_JOBS        (DHCP_PKT_BURST + 2 * DHCP_PKT_RATE)