version 1.1.1.1, 2013/07/29 19:37:40
|
version 1.1.1.2, 2014/06/15 16:31:38
|
Line 1
|
Line 1
|
/* dnsmasq is Copyright (c) 2000-2013 Simon Kelley | /* dnsmasq is Copyright (c) 2000-2014 Simon Kelley |
|
|
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
Line 18
|
Line 18
|
#define MAX_PROCS 20 /* max no children for TCP requests */ |
#define MAX_PROCS 20 /* max no children for TCP requests */ |
#define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */ |
#define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */ |
#define EDNS_PKTSZ 4096 /* default max EDNS.0 UDP packet from RFC5625 */ |
#define EDNS_PKTSZ 4096 /* default max EDNS.0 UDP packet from RFC5625 */ |
#define KEYBLOCK_LEN 140 /* choose to mininise fragmentation when storing DNSSEC keys */ | #define KEYBLOCK_LEN 40 /* choose to mininise fragmentation when storing DNSSEC keys */ |
| #define DNSSEC_WORK 50 /* Max number of queries to validate one question */ |
#define TIMEOUT 10 /* drop UDP queries after TIMEOUT seconds */ |
#define TIMEOUT 10 /* drop UDP queries after TIMEOUT seconds */ |
#define FORWARD_TEST 50 /* try all servers every 50 queries */ |
#define FORWARD_TEST 50 /* try all servers every 50 queries */ |
#define FORWARD_TIME 20 /* or 20 seconds */ |
#define FORWARD_TIME 20 /* or 20 seconds */ |
Line 30
|
Line 31
|
#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 */ |
Line 39
|
Line 41
|
#define TFTP_MAX_CONNECTIONS 50 /* max simultaneous connections */ |
#define TFTP_MAX_CONNECTIONS 50 /* max simultaneous connections */ |
#define LOG_MAX 5 /* log-queue length */ |
#define LOG_MAX 5 /* log-queue length */ |
#define RANDFILE "/dev/urandom" |
#define RANDFILE "/dev/urandom" |
#define EDNS0_OPTION_MAC 5 /* dyndns.org temporary assignment */ |
|
#define DNSMASQ_SERVICE "uk.org.thekelleys.dnsmasq" /* Default - may be overridden by config */ |
#define DNSMASQ_SERVICE "uk.org.thekelleys.dnsmasq" /* Default - may be overridden by config */ |
#define DNSMASQ_PATH "/uk/org/thekelleys/dnsmasq" |
#define DNSMASQ_PATH "/uk/org/thekelleys/dnsmasq" |
#define AUTH_TTL 600 /* default TTL for auth DNS */ |
#define AUTH_TTL 600 /* default TTL for auth DNS */ |
#define SOA_REFRESH 1200 /* SOA refresh default */ |
#define SOA_REFRESH 1200 /* SOA refresh default */ |
#define SOA_RETRY 180 /* SOA retry default */ |
#define SOA_RETRY 180 /* SOA retry default */ |
#define SOA_EXPIRY 1209600 /* SOA expiry default */ |
#define SOA_EXPIRY 1209600 /* SOA expiry default */ |
#define RA_INTERVAL 600 /* Send unsolicited RA's this often when not provoked. */ |
|
|
|
/* compile-time options: uncomment below to enable or do eg. |
/* compile-time options: uncomment below to enable or do eg. |
make COPTS=-DHAVE_BROKEN_RTC |
make COPTS=-DHAVE_BROKEN_RTC |
Line 126 RESOLVFILE
|
Line 126 RESOLVFILE
|
|
|
*/ |
*/ |
|
|
|
/* Defining this builds a binary which handles time differently and works better on a system without a |
|
stable RTC (it uses uptime, not epoch time) and writes the DHCP leases file less often to avoid flash wear. |
|
*/ |
|
|
|
/* #define HAVE_BROKEN_RTC */ |
|
|
/* The default set of options to build. Built with these options, dnsmasq |
/* The default set of options to build. Built with these options, dnsmasq |
has no library dependencies other than libc */ |
has no library dependencies other than libc */ |
|
|
Line 136 RESOLVFILE
|
Line 141 RESOLVFILE
|
#define HAVE_SCRIPT |
#define HAVE_SCRIPT |
#define HAVE_AUTH |
#define HAVE_AUTH |
#define HAVE_IPSET |
#define HAVE_IPSET |
|
|
|
/* Build options which require external libraries. |
|
|
|
Defining HAVE_<opt>_STATIC as _well_ as HAVE_<opt> will link the library statically. |
|
|
|
You can use "make COPTS=-DHAVE_<opt>" instead of editing these. |
|
*/ |
|
|
/* #define HAVE_LUASCRIPT */ |
/* #define HAVE_LUASCRIPT */ |
/* #define HAVE_BROKEN_RTC */ |
|
/* #define HAVE_DBUS */ |
/* #define HAVE_DBUS */ |
/* #define HAVE_IDN */ |
/* #define HAVE_IDN */ |
/* #define HAVE_CONNTRACK */ |
/* #define HAVE_CONNTRACK */ |
|
/* #define HAVE_DNSSEC */ |
|
|
|
|
/* Default locations for important system files. */ |
/* Default locations for important system files. */ |
Line 191 HAVE_SOLARIS_NETWORK
|
Line 204 HAVE_SOLARIS_NETWORK
|
HAVE_GETOPT_LONG |
HAVE_GETOPT_LONG |
defined when GNU-style getopt_long available. |
defined when GNU-style getopt_long available. |
|
|
HAVE_ARC4RANDOM |
|
defined if arc4random() available to get better security from DNS spoofs |
|
by using really random ids (OpenBSD) |
|
|
|
HAVE_SOCKADDR_SA_LEN |
HAVE_SOCKADDR_SA_LEN |
defined if struct sockaddr has sa_len field (*BSD) |
defined if struct sockaddr has sa_len field (*BSD) |
*/ |
*/ |
Line 203 HAVE_SOCKADDR_SA_LEN
|
Line 212 HAVE_SOCKADDR_SA_LEN
|
#if defined(__uClinux__) |
#if defined(__uClinux__) |
#define HAVE_LINUX_NETWORK |
#define HAVE_LINUX_NETWORK |
#define HAVE_GETOPT_LONG |
#define HAVE_GETOPT_LONG |
#undef HAVE_ARC4RANDOM |
|
#undef HAVE_SOCKADDR_SA_LEN |
#undef HAVE_SOCKADDR_SA_LEN |
/* Never use fork() on uClinux. Note that this is subtly different from the |
/* Never use fork() on uClinux. Note that this is subtly different from the |
--keep-in-foreground option, since it also suppresses forking new |
--keep-in-foreground option, since it also suppresses forking new |
Line 217 HAVE_SOCKADDR_SA_LEN
|
Line 225 HAVE_SOCKADDR_SA_LEN
|
((__UCLIBC_MAJOR__==0) && (__UCLIBC_MINOR__==9) && (__UCLIBC_SUBLEVEL__<21)) |
((__UCLIBC_MAJOR__==0) && (__UCLIBC_MINOR__==9) && (__UCLIBC_SUBLEVEL__<21)) |
# define HAVE_GETOPT_LONG |
# define HAVE_GETOPT_LONG |
#endif |
#endif |
#undef HAVE_ARC4RANDOM |
|
#undef HAVE_SOCKADDR_SA_LEN |
#undef HAVE_SOCKADDR_SA_LEN |
#if !defined(__ARCH_HAS_MMU__) && !defined(__UCLIBC_HAS_MMU__) |
#if !defined(__ARCH_HAS_MMU__) && !defined(__UCLIBC_HAS_MMU__) |
# define NO_FORK |
# define NO_FORK |
Line 232 HAVE_SOCKADDR_SA_LEN
|
Line 239 HAVE_SOCKADDR_SA_LEN
|
#elif defined(__linux__) |
#elif defined(__linux__) |
#define HAVE_LINUX_NETWORK |
#define HAVE_LINUX_NETWORK |
#define HAVE_GETOPT_LONG |
#define HAVE_GETOPT_LONG |
#undef HAVE_ARC4RANDOM |
|
#undef HAVE_SOCKADDR_SA_LEN |
#undef HAVE_SOCKADDR_SA_LEN |
|
|
#elif defined(__FreeBSD__) || \ |
#elif defined(__FreeBSD__) || \ |
Line 244 HAVE_SOCKADDR_SA_LEN
|
Line 250 HAVE_SOCKADDR_SA_LEN
|
#if defined(optional_argument) && defined(required_argument) |
#if defined(optional_argument) && defined(required_argument) |
# define HAVE_GETOPT_LONG |
# define HAVE_GETOPT_LONG |
#endif |
#endif |
#if !defined(__FreeBSD_kernel__) |
|
# define HAVE_ARC4RANDOM |
|
#endif |
|
#define HAVE_SOCKADDR_SA_LEN |
#define HAVE_SOCKADDR_SA_LEN |
|
|
#elif defined(__APPLE__) |
#elif defined(__APPLE__) |
#define HAVE_BSD_NETWORK |
#define HAVE_BSD_NETWORK |
#define HAVE_GETOPT_LONG |
#define HAVE_GETOPT_LONG |
#define HAVE_ARC4RANDOM |
|
#define HAVE_SOCKADDR_SA_LEN |
#define HAVE_SOCKADDR_SA_LEN |
/* Define before sys/socket.h is included so we get socklen_t */ |
/* Define before sys/socket.h is included so we get socklen_t */ |
#define _BSD_SOCKLEN_T_ |
#define _BSD_SOCKLEN_T_ |
| /* Select the RFC_3542 version of the IPv6 socket API. |
| Define before netinet6/in6.h is included. */ |
| #define __APPLE_USE_RFC_3542 |
| |
#elif defined(__NetBSD__) |
#elif defined(__NetBSD__) |
#define HAVE_BSD_NETWORK |
#define HAVE_BSD_NETWORK |
#define HAVE_GETOPT_LONG |
#define HAVE_GETOPT_LONG |
#undef HAVE_ARC4RANDOM |
|
#define HAVE_SOCKADDR_SA_LEN |
#define HAVE_SOCKADDR_SA_LEN |
|
|
#elif defined(__sun) || defined(__sun__) |
#elif defined(__sun) || defined(__sun__) |
#define HAVE_SOLARIS_NETWORK |
#define HAVE_SOLARIS_NETWORK |
#define HAVE_GETOPT_LONG |
#define HAVE_GETOPT_LONG |
#undef HAVE_ARC4RANDOM |
|
#undef HAVE_SOCKADDR_SA_LEN |
#undef HAVE_SOCKADDR_SA_LEN |
#define ETHER_ADDR_LEN 6 |
#define ETHER_ADDR_LEN 6 |
|
|
Line 279 HAVE_SOCKADDR_SA_LEN
|
Line 282 HAVE_SOCKADDR_SA_LEN
|
#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY) |
#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY) |
# define HAVE_IPV6 |
# define HAVE_IPV6 |
# define ADDRSTRLEN INET6_ADDRSTRLEN |
# define ADDRSTRLEN INET6_ADDRSTRLEN |
#elif defined(INET_ADDRSTRLEN) |
|
# undef HAVE_IPV6 |
|
# define ADDRSTRLEN INET_ADDRSTRLEN |
|
#else |
#else |
|
# if !defined(INET_ADDRSTRLEN) |
|
# define INET_ADDRSTRLEN 16 /* 4*3 + 3 dots + NULL */ |
|
# endif |
# undef HAVE_IPV6 |
# undef HAVE_IPV6 |
# define ADDRSTRLEN 16 /* 4*3 + 3 dots + NULL */ | # define ADDRSTRLEN INET_ADDRSTRLEN |
#endif |
#endif |
|
|
|
|
Line 396 static char *compile_opts =
|
Line 399 static char *compile_opts =
|
#ifndef HAVE_AUTH |
#ifndef HAVE_AUTH |
"no-" |
"no-" |
#endif |
#endif |
"auth"; | "auth " |
| #ifndef HAVE_DNSSEC |
| "no-" |
| #endif |
| "DNSSEC"; |
| |
|
|
#endif |
#endif |
|
|