PCAP_LOOP_SLEEP bug fix to 1/10th of a second

[server] Updated PCAP_LOOP_SLEEP default to 1/10th of a second (in
microseconds).  This was supposed to be the default anyway, but C
Anthony Risinger reported a bug where fwknopd was consuming more
resources than necessary, and the cause was PCAP_LOOP_SLEEP set by
default to 1/100th of a second - this has been fixed.
This commit is contained in:
Michael Rash
2012-07-23 21:13:30 -04:00
parent 6255bff95f
commit 5387242ce9
5 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
/* For integer variable range checking
*/
#define RCHK_MAX_PCAP_LOOP_SLEEP 100000 /* microseconds */
#define RCHK_MAX_PCAP_LOOP_SLEEP 10000000 /* microseconds, 10 seconds */
#define RCHK_MAX_SPA_PACKET_AGE 100000 /* seconds, can disable */
#define RCHK_MAX_SNIFF_BYTES 1514
#define RCHK_MAX_TCPSERV_PORT 65535
+2 -2
View File
@@ -74,8 +74,8 @@
#PCAP_DISPATCH_COUNT 0;
# Sets the number of microseconds to passed as an argument to usleep() in
# the pcap loop. The default is 10000, or 1/10th of a second.
#PCAP_LOOP_SLEEP 10000;
# the pcap loop. The default is 100000 microseconds, or 1/10th of a second.
#PCAP_LOOP_SLEEP 100000;
# Allow SPA clients to request access to services through an iptables
# firewall instead of just to it (i.e. access through the FWKNOP_FORWARD
+1 -1
View File
@@ -86,7 +86,7 @@
#define DEF_ENABLE_PCAP_PROMISC "N"
#define DEF_PCAP_FILTER "udp port 62201"
#define DEF_PCAP_DISPATCH_COUNT "0"
#define DEF_PCAP_LOOP_SLEEP "10000" /* a tenth of a second */
#define DEF_PCAP_LOOP_SLEEP "100000" /* a tenth of a second (in microseconds) */
#define DEF_ENABLE_SPA_PACKET_AGING "Y"
#define DEF_MAX_SPA_PACKET_AGE "120"
#define DEF_ENABLE_DIGEST_PERSISTENCE "Y"