Tweak tuning params.

This commit is contained in:
Simon Kelley
2014-03-01 20:03:47 +00:00
parent 0575610fa1
commit 1fbe4d2f5f
3 changed files with 5 additions and 4 deletions

View File

@@ -31,7 +31,8 @@
#define PING_CACHE_TIME 30 /* Ping test assumed to be valid this long. */ #define PING_CACHE_TIME 30 /* Ping test assumed to be valid this long. */
#define DECLINE_BACKOFF 600 /* disable DECLINEd static addresses for this long */ #define DECLINE_BACKOFF 600 /* disable DECLINEd static addresses for this long */
#define DHCP_PACKET_MAX 16384 /* hard limit on DHCP packet size */ #define DHCP_PACKET_MAX 16384 /* hard limit on DHCP packet size */
#define SMALLDNAME 40 /* most domain names are smaller than this */ #define SMALLDNAME 50 /* most domain names are smaller than this */
#define CNAME_CHAIN 10 /* chains longer than this atr dropped for loop protection */
#define HOSTSFILE "/etc/hosts" #define HOSTSFILE "/etc/hosts"
#define ETHERSFILE "/etc/ethers" #define ETHERSFILE "/etc/ethers"
#define DEFLEASE 3600 /* default lease time, 1 hour */ #define DEFLEASE 3600 /* default lease time, 1 hour */

View File

@@ -1653,7 +1653,7 @@ int dnssec_validate_reply(time_t now, struct dns_header *header, size_t plen, ch
{ {
unsigned char *ans_start, *qname, *p1, *p2, **nsecs; unsigned char *ans_start, *qname, *p1, *p2, **nsecs;
int type1, class1, rdlen1, type2, class2, rdlen2, qclass, qtype; int type1, class1, rdlen1, type2, class2, rdlen2, qclass, qtype;
int i, j, rc, nsec_count, cname_count = 10; int i, j, rc, nsec_count, cname_count = CNAME_CHAIN;
int nsec_type = 0, have_answer = 0; int nsec_type = 0, have_answer = 0;
if (neganswer) if (neganswer)
@@ -1930,7 +1930,7 @@ int dnssec_chase_cname(time_t now, struct dns_header *header, size_t plen, char
{ {
unsigned char *p = (unsigned char *)(header+1); unsigned char *p = (unsigned char *)(header+1);
int type, class, qtype, qclass, rdlen, j, rc; int type, class, qtype, qclass, rdlen, j, rc;
int cname_count = 10; int cname_count = CNAME_CHAIN;
/* Get question */ /* Get question */
if (!extract_name(header, plen, &p, name, 1, 4)) if (!extract_name(header, plen, &p, name, 1, 4))

View File

@@ -927,7 +927,7 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
for (i = ntohs(header->qdcount); i != 0; i--) for (i = ntohs(header->qdcount); i != 0; i--)
{ {
int found = 0, cname_count = 10; int found = 0, cname_count = CNAME_CHAIN;
struct crec *cpp = NULL; struct crec *cpp = NULL;
int flags = RCODE(header) == NXDOMAIN ? F_NXDOMAIN : 0; int flags = RCODE(header) == NXDOMAIN ? F_NXDOMAIN : 0;
int secflag = secure ? F_DNSSECOK : 0; int secflag = secure ? F_DNSSECOK : 0;