blob: 8c41943020ca557084290f1bee0b9fdb5e8b609c [file] [log] [blame]
Simon Kelleyc8e8f5c2021-01-24 21:59:37 +00001/* dnsmasq is Copyright (c) 2000-2021 Simon Kelley
Simon Kelley9e4abcb2004-01-22 19:47:41 +00002
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
Simon Kelley824af852008-02-12 20:43:05 +00005 the Free Software Foundation; version 2 dated June, 1991, or
6 (at your option) version 3 dated 29 June, 2007.
7
Simon Kelley9e4abcb2004-01-22 19:47:41 +00008 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
Simon Kelley824af852008-02-12 20:43:05 +000012
Simon Kelley73a08a22009-02-05 20:28:08 +000013 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
Simon Kelley9e4abcb2004-01-22 19:47:41 +000015*/
16
Simon Kelley208b65c2006-08-05 21:41:37 +010017#define FTABSIZ 150 /* max number of outstanding requests (default) */
Simon Kelleyfeba5c12004-07-27 20:28:58 +010018#define MAX_PROCS 20 /* max no children for TCP requests */
19#define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */
Simon Kelley25cf5e32015-01-09 15:53:03 +000020#define TCP_MAX_QUERIES 100 /* Maximum number of queries per incoming TCP connection */
Simon Kelley09b768e2016-12-22 22:16:58 +000021#define TCP_BACKLOG 32 /* kernel backlog limit for TCP connections */
Simon Kelley316e2732010-01-22 20:16:09 +000022#define EDNS_PKTSZ 4096 /* default max EDNS.0 UDP packet from RFC5625 */
Simon Kelleya77cec82015-05-08 16:25:38 +010023#define SAFE_PKTSZ 1280 /* "go anywhere" UDP packet size */
Josh Soref730c6742017-02-06 16:14:04 +000024#define KEYBLOCK_LEN 40 /* choose to minimise fragmentation when storing DNSSEC keys */
Simon Kelley7fa836e2014-02-10 20:11:24 +000025#define DNSSEC_WORK 50 /* Max number of queries to validate one question */
Simon Kelley16972692006-10-16 20:04:18 +010026#define TIMEOUT 10 /* drop UDP queries after TIMEOUT seconds */
Simon Kelley1f15b812009-10-13 17:49:32 +010027#define FORWARD_TEST 50 /* try all servers every 50 queries */
Simon Kelley28866e92011-02-14 20:19:14 +000028#define FORWARD_TIME 20 /* or 20 seconds */
Simon Kelleyc1a4e252018-01-19 22:00:05 +000029#define UDP_TEST_TIME 60 /* How often to reset our idea of max packet size. */
Simon Kelleyb9702602016-05-03 22:34:06 +010030#define SERVERS_LOGGED 30 /* Only log this many servers when logging state */
Hannu Nyman3e2496f2017-02-11 13:44:08 +000031#define LOCALS_LOGGED 8 /* Only log this many local addresses when logging state */
Simon Kelleycdeda282006-03-16 20:16:06 +000032#define LEASE_RETRY 60 /* on error, retry writing leasefile after LEASE_RETRY seconds */
Simon Kelley9e4abcb2004-01-22 19:47:41 +000033#define CACHESIZ 150 /* default cache size */
RinSatsuki28de3872015-01-10 15:22:21 +000034#define TTL_FLOOR_LIMIT 3600 /* don't allow --min-cache-ttl to raise TTL above this under any circumstances */
Simon Kelley316e2732010-01-22 20:16:09 +000035#define MAXLEASES 1000 /* maximum number of DHCP leases */
Simon Kelley5e9e0ef2006-04-17 14:24:29 +010036#define PING_WAIT 3 /* wait for ping address-in-use test */
37#define PING_CACHE_TIME 30 /* Ping test assumed to be valid this long. */
Simon Kelley849a8352006-06-09 21:02:31 +010038#define DECLINE_BACKOFF 600 /* disable DECLINEd static addresses for this long */
Simon Kelley5e9e0ef2006-04-17 14:24:29 +010039#define DHCP_PACKET_MAX 16384 /* hard limit on DHCP packet size */
Simon Kelley1fbe4d22014-03-01 20:03:47 +000040#define SMALLDNAME 50 /* most domain names are smaller than this */
41#define CNAME_CHAIN 10 /* chains longer than this atr dropped for loop protection */
Simon Kelley7e194a02020-07-12 17:43:25 +010042#define DNSSEC_MIN_TTL 60 /* DNSKEY and DS records in cache last at least this long */
Simon Kelley9e4abcb2004-01-22 19:47:41 +000043#define HOSTSFILE "/etc/hosts"
Simon Kelley44a2a312004-03-10 20:04:35 +000044#define ETHERSFILE "/etc/ethers"
Simon Kelley4d85e402020-07-12 22:45:46 +010045#define DEFLEASE 3600 /* default DHCPv4 lease time, one hour */
46#define DEFLEASE6 (3600*24) /* default lease time for DHCPv6. One day. */
Simon Kelleyc72daea2012-01-05 21:33:27 +000047#define CHUSER "nobody"
48#define CHGRP "dip"
49#define TFTP_MAX_CONNECTIONS 50 /* max simultaneous connections */
50#define LOG_MAX 5 /* log-queue length */
51#define RANDFILE "/dev/urandom"
Simon Kelleyad094272012-08-10 17:10:54 +010052#define DNSMASQ_SERVICE "uk.org.thekelleys.dnsmasq" /* Default - may be overridden by config */
Simon Kelleyc72daea2012-01-05 21:33:27 +000053#define DNSMASQ_PATH "/uk/org/thekelleys/dnsmasq"
Oldřich Jedličkad162bee2020-03-20 22:18:57 +010054#define DNSMASQ_UBUS_NAME "dnsmasq" /* Default - may be overridden by config */
Simon Kelley4f7b3042012-11-28 21:27:02 +000055#define AUTH_TTL 600 /* default TTL for auth DNS */
56#define SOA_REFRESH 1200 /* SOA refresh default */
57#define SOA_RETRY 180 /* SOA retry default */
58#define SOA_EXPIRY 1209600 /* SOA expiry default */
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +010059#define LOOP_TEST_DOMAIN "test" /* domain for loop testing, "test" is reserved by RFC 2606 and won't therefore clash */
60#define LOOP_TEST_TYPE T_TXT
Simon Kelley4f7b3042012-11-28 21:27:02 +000061
Simon Kelleyc72daea2012-01-05 21:33:27 +000062/* compile-time options: uncomment below to enable or do eg.
63 make COPTS=-DHAVE_BROKEN_RTC
64
65HAVE_BROKEN_RTC
66 define this on embedded systems which don't have an RTC
67 which keeps time over reboots. Causes dnsmasq to use uptime
68 for timing, and keep lease lengths rather than expiry times
69 in its leases file. This also make dnsmasq "flash disk friendly".
70 Normally, dnsmasq tries very hard to keep the on-disk leases file
71 up-to-date: rewriting it after every renewal. When HAVE_BROKEN_RTC
72 is in effect, the lease file is only written when a new lease is
73 created, or an old one destroyed. (Because those are the only times
74 it changes.) This vastly reduces the number of file writes, and makes
75 it viable to keep the lease file on a flash filesystem.
76 NOTE: when enabling or disabling this, be sure to delete any old
77 leases file, otherwise dnsmasq may get very confused.
78
79HAVE_TFTP
80 define this to get dnsmasq's built-in TFTP server.
81
82HAVE_DHCP
83 define this to get dnsmasq's DHCPv4 server.
84
85HAVE_DHCP6
86 define this to get dnsmasq's DHCPv6 server. (implies HAVE_DHCP).
87
88HAVE_SCRIPT
89 define this to get the ability to call scripts on lease-change.
90
91HAVE_LUASCRIPT
92 define this to get the ability to call Lua script on lease-change. (implies HAVE_SCRIPT)
93
94HAVE_DBUS
95 define this if you want to link against libdbus, and have dnsmasq
96 support some methods to allow (re)configuration of the upstream DNS
97 servers via DBus.
98
Julian Kornbergercaf4d572018-07-21 21:45:03 +010099HAVE_UBUS
100 define this if you want to link against libubus
101
Simon Kelleyc72daea2012-01-05 21:33:27 +0000102HAVE_IDN
Petr Menšíkd203af42017-05-10 21:41:57 +0100103 define this if you want international domain name 2003 support.
Simon Kelley43cdf1c2017-05-21 22:12:44 +0100104
Petr Menšíkd203af42017-05-10 21:41:57 +0100105HAVE_LIBIDN2
106 define this if you want international domain name 2008 support.
107
Simon Kelleyc72daea2012-01-05 21:33:27 +0000108HAVE_CONNTRACK
Josh Soref730c6742017-02-06 16:14:04 +0000109 define this to include code which propagates conntrack marks from
Simon Kelleyc72daea2012-01-05 21:33:27 +0000110 incoming DNS queries to the corresponding upstream queries. This adds
111 a build-dependency on libnetfilter_conntrack, but the resulting binary will
112 still run happily on a kernel without conntrack support.
113
Jason A. Donenfeld13d86c72013-02-22 18:20:53 +0000114HAVE_IPSET
115 define this to include the ability to selectively add resolved ip addresses
116 to given ipsets.
117
Simon Kelley4820dce2012-12-18 18:30:30 +0000118HAVE_AUTH
119 define this to include the facility to act as an authoritative DNS
120 server for one or more zones.
121
Simon Kelleya69b0172021-01-24 21:53:28 +0000122HAVE_CRYPTOHASH
123 include just hash function from crypto library, but no DNSSEC.
Petr Menšík2024f972020-11-25 17:18:55 +0100124
Simon Kelley063efb32014-06-17 19:49:31 +0100125HAVE_DNSSEC
126 include DNSSEC validator.
Simon Kelley4820dce2012-12-18 18:30:30 +0000127
Simon Kelley6b173352018-05-08 18:32:14 +0100128HAVE_DUMPFILE
129 include code to dump packets to a libpcap-format file for debugging.
130
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +0100131HAVE_LOOP
132 include functionality to probe for and remove DNS forwarding loops.
133
Simon Kelley04918052015-01-26 11:23:43 +0000134HAVE_INOTIFY
135 use the Linux inotify facility to efficiently re-read configuration files.
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +0100136
Kevin Darbyshire-Bryant7ac9ae12016-09-09 20:52:08 +0100137NO_ID
138 Don't report *.bind CHAOS info to clients, forward such requests upstream instead.
Simon Kelleyc72daea2012-01-05 21:33:27 +0000139NO_TFTP
140NO_DHCP
141NO_DHCP6
142NO_SCRIPT
143NO_LARGEFILE
Simon Kelley4820dce2012-12-18 18:30:30 +0000144NO_AUTH
Simon Kelley6b173352018-05-08 18:32:14 +0100145NO_DUMPFILE
Simon Kelley04918052015-01-26 11:23:43 +0000146NO_INOTIFY
klemens43517fc2017-02-19 15:53:37 +0000147 these are available to explicitly disable compile time options which would
Simon Kelleyee875042018-10-23 22:10:17 +0100148 otherwise be enabled automatically or which are enabled by default
149 in the distributed source tree. Building dnsmasq
Simon Kelleyc72daea2012-01-05 21:33:27 +0000150 with something like "make COPTS=-DNO_SCRIPT" will do the trick.
Simon Kelley063efb32014-06-17 19:49:31 +0100151NO_GMP
152 Don't use and link against libgmp, Useful if nettle is built with --enable-mini-gmp.
153
Simon Kelleyc72daea2012-01-05 21:33:27 +0000154LEASEFILE
155CONFFILE
156RESOLVFILE
157 the default locations of these files are determined below, but may be overridden
158 in a build command line using COPTS.
159
160*/
161
Simon Kelleyc979fa02014-01-21 13:45:17 +0000162/* Defining this builds a binary which handles time differently and works better on a system without a
163 stable RTC (it uses uptime, not epoch time) and writes the DHCP leases file less often to avoid flash wear.
164*/
165
166/* #define HAVE_BROKEN_RTC */
Simon Kelleyc72daea2012-01-05 21:33:27 +0000167
168/* The default set of options to build. Built with these options, dnsmasq
169 has no library dependencies other than libc */
170
171#define HAVE_DHCP
Simon Kelley07933802012-02-14 20:55:25 +0000172#define HAVE_DHCP6
Simon Kelleyc72daea2012-01-05 21:33:27 +0000173#define HAVE_TFTP
174#define HAVE_SCRIPT
Simon Kelley4820dce2012-12-18 18:30:30 +0000175#define HAVE_AUTH
Simon Kelley3ddad242013-03-21 17:56:06 +0000176#define HAVE_IPSET
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +0100177#define HAVE_LOOP
Simon Kelley6b173352018-05-08 18:32:14 +0100178#define HAVE_DUMPFILE
Simon Kelleyc979fa02014-01-21 13:45:17 +0000179
180/* Build options which require external libraries.
181
182 Defining HAVE_<opt>_STATIC as _well_ as HAVE_<opt> will link the library statically.
183
184 You can use "make COPTS=-DHAVE_<opt>" instead of editing these.
185*/
186
Simon Kelleyc72daea2012-01-05 21:33:27 +0000187/* #define HAVE_LUASCRIPT */
Simon Kelleyc72daea2012-01-05 21:33:27 +0000188/* #define HAVE_DBUS */
189/* #define HAVE_IDN */
Petr Menšíkd203af42017-05-10 21:41:57 +0100190/* #define HAVE_LIBIDN2 */
Simon Kelleyc72daea2012-01-05 21:33:27 +0000191/* #define HAVE_CONNTRACK */
Simon Kelleya69b0172021-01-24 21:53:28 +0000192/* #define HAVE_CRYPTOHASH */
Simon Kelley65d1e3b2014-01-08 11:00:01 +0000193/* #define HAVE_DNSSEC */
194
Simon Kelleyc72daea2012-01-05 21:33:27 +0000195
196/* Default locations for important system files. */
Simon Kelley73a08a22009-02-05 20:28:08 +0000197
198#ifndef LEASEFILE
199# if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
200# define LEASEFILE "/var/db/dnsmasq.leases"
201# elif defined(__sun__) || defined (__sun)
202# define LEASEFILE "/var/cache/dnsmasq.leases"
Simon Kelley572b41e2011-02-18 18:11:18 +0000203# elif defined(__ANDROID__)
204# define LEASEFILE "/data/misc/dhcp/dnsmasq.leases"
Simon Kelley73a08a22009-02-05 20:28:08 +0000205# else
206# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
207# endif
Simon Kelleyfeba5c12004-07-27 20:28:58 +0100208#endif
Simon Kelley73a08a22009-02-05 20:28:08 +0000209
210#ifndef CONFFILE
211# if defined(__FreeBSD__)
212# define CONFFILE "/usr/local/etc/dnsmasq.conf"
213# else
214# define CONFFILE "/etc/dnsmasq.conf"
215# endif
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000216#endif
Simon Kelley73a08a22009-02-05 20:28:08 +0000217
Simon Kelleyc72daea2012-01-05 21:33:27 +0000218#ifndef RESOLVFILE
219# if defined(__uClinux__)
220# define RESOLVFILE "/etc/config/resolv.conf"
221# else
222# define RESOLVFILE "/etc/resolv.conf"
223# endif
224#endif
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000225
Simon Kelley55d290a2012-06-29 20:58:32 +0100226#ifndef RUNFILE
227# if defined(__ANDROID__)
228# define RUNFILE "/data/dnsmasq.pid"
229# else
230# define RUNFILE "/var/run/dnsmasq.pid"
231# endif
232#endif
Simon Kelleyc72daea2012-01-05 21:33:27 +0000233
234/* platform dependent options: these are determined automatically below
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000235
Simon Kelley5e9e0ef2006-04-17 14:24:29 +0100236HAVE_LINUX_NETWORK
Simon Kelley824af852008-02-12 20:43:05 +0000237HAVE_BSD_NETWORK
238HAVE_SOLARIS_NETWORK
239 define exactly one of these to alter interaction with kernel networking.
240
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000241HAVE_GETOPT_LONG
Simon Kelleyda632e72012-03-26 11:14:05 +0100242 defined when GNU-style getopt_long available.
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000243
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000244HAVE_SOCKADDR_SA_LEN
Simon Kelleyc72daea2012-01-05 21:33:27 +0000245 defined if struct sockaddr has sa_len field (*BSD)
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000246*/
247
Simon Kelley48d12f12018-11-02 21:55:04 +0000248#if defined(__UCLIBC__)
Simon Kelley5e9e0ef2006-04-17 14:24:29 +0100249#define HAVE_LINUX_NETWORK
Simon Kelleye17fb622006-01-14 20:33:46 +0000250#if defined(__UCLIBC_HAS_GNU_GETOPT__) || \
251 ((__UCLIBC_MAJOR__==0) && (__UCLIBC_MINOR__==9) && (__UCLIBC_SUBLEVEL__<21))
252# define HAVE_GETOPT_LONG
Simon Kelley5e9e0ef2006-04-17 14:24:29 +0100253#endif
Simon Kelleye17fb622006-01-14 20:33:46 +0000254#undef HAVE_SOCKADDR_SA_LEN
Simon Kelley7cebd202006-05-06 14:13:33 +0100255#if defined(__UCLIBC_HAS_IPV6__)
256# ifndef IPV6_V6ONLY
257# define IPV6_V6ONLY 26
258# endif
Simon Kelleye17fb622006-01-14 20:33:46 +0000259#endif
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000260
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000261/* This is for glibc 2.x */
262#elif defined(__linux__)
Simon Kelley5e9e0ef2006-04-17 14:24:29 +0100263#define HAVE_LINUX_NETWORK
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000264#define HAVE_GETOPT_LONG
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000265#undef HAVE_SOCKADDR_SA_LEN
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000266
Simon Kelley9e038942008-05-30 20:06:34 +0100267#elif defined(__FreeBSD__) || \
268 defined(__OpenBSD__) || \
269 defined(__DragonFly__) || \
Simon Kelley8ef5ada2010-06-03 19:42:45 +0100270 defined(__FreeBSD_kernel__)
Simon Kelley824af852008-02-12 20:43:05 +0000271#define HAVE_BSD_NETWORK
Josh Soref730c6742017-02-06 16:14:04 +0000272/* Later versions of FreeBSD have getopt_long() */
Simon Kelley59353a62004-11-21 19:34:28 +0000273#if defined(optional_argument) && defined(required_argument)
274# define HAVE_GETOPT_LONG
Simon Kelley59353a62004-11-21 19:34:28 +0000275#endif
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000276#define HAVE_SOCKADDR_SA_LEN
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000277
278#elif defined(__APPLE__)
Simon Kelley824af852008-02-12 20:43:05 +0000279#define HAVE_BSD_NETWORK
Simon Kelley316e2732010-01-22 20:16:09 +0000280#define HAVE_GETOPT_LONG
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000281#define HAVE_SOCKADDR_SA_LEN
Simon Kelleye198fe82019-08-22 23:23:29 +0100282#define NO_IPSET
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000283/* Define before sys/socket.h is included so we get socklen_t */
284#define _BSD_SOCKLEN_T_
Simon Kelley6dbdc972013-10-28 14:22:57 +0000285/* Select the RFC_3542 version of the IPv6 socket API.
286 Define before netinet6/in6.h is included. */
Simon Kelleye198fe82019-08-22 23:23:29 +0100287#define __APPLE_USE_RFC_3542
288/* Required for Mojave. */
289#ifndef SOL_TCP
290# define SOL_TCP IPPROTO_TCP
291#endif
Chen Yufei993f8cb2014-07-08 22:40:03 +0100292#define NO_IPSET
Simon Kelley6dbdc972013-10-28 14:22:57 +0000293
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000294#elif defined(__NetBSD__)
Simon Kelley824af852008-02-12 20:43:05 +0000295#define HAVE_BSD_NETWORK
Simon Kelleyfd9fa482004-10-21 20:24:00 +0100296#define HAVE_GETOPT_LONG
Simon Kelley9e4abcb2004-01-22 19:47:41 +0000297#define HAVE_SOCKADDR_SA_LEN
Simon Kelley824af852008-02-12 20:43:05 +0000298
299#elif defined(__sun) || defined(__sun__)
300#define HAVE_SOLARIS_NETWORK
Simon Kelley7622fc02009-06-04 20:32:05 +0100301#define HAVE_GETOPT_LONG
Simon Kelley824af852008-02-12 20:43:05 +0000302#undef HAVE_SOCKADDR_SA_LEN
Simon Kelley7622fc02009-06-04 20:32:05 +0100303#define ETHER_ADDR_LEN 6
304
Simon Kelley824af852008-02-12 20:43:05 +0000305#endif
306
Simon Kelleyc72daea2012-01-05 21:33:27 +0000307/* rules to implement compile-time option dependencies and
308 the NO_XXX flags */
309
Simon Kelleyc72daea2012-01-05 21:33:27 +0000310#ifdef NO_TFTP
311#undef HAVE_TFTP
312#endif
313
314#ifdef NO_DHCP
315#undef HAVE_DHCP
316#undef HAVE_DHCP6
317#endif
318
Simon Kelleyee875042018-10-23 22:10:17 +0100319#if defined(NO_DHCP6)
Simon Kelleyc72daea2012-01-05 21:33:27 +0000320#undef HAVE_DHCP6
321#endif
322
323/* DHCP6 needs DHCP too */
324#ifdef HAVE_DHCP6
325#define HAVE_DHCP
326#endif
327
Simon Kelley48d12f12018-11-02 21:55:04 +0000328#if defined(NO_SCRIPT)
Simon Kelleyc72daea2012-01-05 21:33:27 +0000329#undef HAVE_SCRIPT
330#undef HAVE_LUASCRIPT
331#endif
332
333/* Must HAVE_SCRIPT to HAVE_LUASCRIPT */
334#ifdef HAVE_LUASCRIPT
335#define HAVE_SCRIPT
336#endif
337
Simon Kelley4820dce2012-12-18 18:30:30 +0000338#ifdef NO_AUTH
339#undef HAVE_AUTH
340#endif
Simon Kelleyc72daea2012-01-05 21:33:27 +0000341
Simon Kelleyc4a09372014-06-02 20:30:07 +0100342#if defined(NO_IPSET)
Jason A. Donenfeld13d86c72013-02-22 18:20:53 +0000343#undef HAVE_IPSET
344#endif
345
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +0100346#ifdef NO_LOOP
347#undef HAVE_LOOP
348#endif
349
Simon Kelley6b173352018-05-08 18:32:14 +0100350#ifdef NO_DUMPFILE
351#undef HAVE_DUMPFILE
352#endif
353
Simon Kelley04918052015-01-26 11:23:43 +0000354#if defined (HAVE_LINUX_NETWORK) && !defined(NO_INOTIFY)
355#define HAVE_INOTIFY
356#endif
357
Simon Kelleyc72daea2012-01-05 21:33:27 +0000358/* Define a string indicating which options are in use.
Josh Soref730c6742017-02-06 16:14:04 +0000359 DNSMASQ_COMPILE_OPTS is only defined in dnsmasq.c */
Simon Kelleyc72daea2012-01-05 21:33:27 +0000360
361#ifdef DNSMASQ_COMPILE_OPTS
362
363static char *compile_opts =
Simon Kelleyc72daea2012-01-05 21:33:27 +0000364"IPv6 "
365#ifndef HAVE_GETOPT_LONG
366"no-"
367#endif
368"GNU-getopt "
369#ifdef HAVE_BROKEN_RTC
370"no-RTC "
371#endif
Simon Kelleyc72daea2012-01-05 21:33:27 +0000372#ifndef HAVE_DBUS
373"no-"
374#endif
375"DBus "
Jan Willem Janssena2b82202019-03-25 12:42:23 +0100376#ifndef HAVE_UBUS
377"no-"
378#endif
379"UBus "
Simon Kelleyc72daea2012-01-05 21:33:27 +0000380#ifndef LOCALEDIR
381"no-"
382#endif
383"i18n "
Simon Kelley43cdf1c2017-05-21 22:12:44 +0100384#if defined(HAVE_LIBIDN2)
Petr Menšíkd203af42017-05-10 21:41:57 +0100385"IDN2 "
Simon Kelley43cdf1c2017-05-21 22:12:44 +0100386#else
387 #if !defined(HAVE_IDN)
388"no-"
389 #endif
390"IDN "
391#endif
Simon Kelleyc72daea2012-01-05 21:33:27 +0000392#ifndef HAVE_DHCP
393"no-"
394#endif
395"DHCP "
396#if defined(HAVE_DHCP)
397# if !defined (HAVE_DHCP6)
398 "no-"
399# endif
400 "DHCPv6 "
Simon Kelleya93b02e2017-04-16 20:38:22 +0100401#endif
402#if !defined(HAVE_SCRIPT)
Simon Kelleyc72daea2012-01-05 21:33:27 +0000403 "no-scripts "
Simon Kelleya93b02e2017-04-16 20:38:22 +0100404#else
405# if !defined(HAVE_LUASCRIPT)
406 "no-"
Simon Kelleyc72daea2012-01-05 21:33:27 +0000407# endif
Simon Kelleya93b02e2017-04-16 20:38:22 +0100408 "Lua "
Simon Kelleyc72daea2012-01-05 21:33:27 +0000409#endif
410#ifndef HAVE_TFTP
411"no-"
412#endif
413"TFTP "
414#ifndef HAVE_CONNTRACK
415"no-"
416#endif
Simon Kelley4820dce2012-12-18 18:30:30 +0000417"conntrack "
Jason A. Donenfeld13d86c72013-02-22 18:20:53 +0000418#ifndef HAVE_IPSET
419"no-"
420#endif
421"ipset "
Simon Kelley4820dce2012-12-18 18:30:30 +0000422#ifndef HAVE_AUTH
423"no-"
424#endif
Simon Kelley0fc2f312014-01-08 10:26:58 +0000425"auth "
Simon Kelleya69b0172021-01-24 21:53:28 +0000426#if !defined(HAVE_CRYPTOHASH) && !defined(HAVE_DNSSEC)
Petr Menšík2024f972020-11-25 17:18:55 +0100427"no-"
428#endif
Simon Kelleya69b0172021-01-24 21:53:28 +0000429"cryptohash "
Simon Kelley0fc2f312014-01-08 10:26:58 +0000430#ifndef HAVE_DNSSEC
431"no-"
432#endif
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +0100433"DNSSEC "
Kevin Darbyshire-Bryant7ac9ae12016-09-09 20:52:08 +0100434#ifdef NO_ID
435"no-ID "
436#endif
Simon Kelleyb5ea1cc2014-07-29 16:34:14 +0100437#ifndef HAVE_LOOP
438"no-"
439#endif
Simon Kelley04918052015-01-26 11:23:43 +0000440"loop-detect "
441#ifndef HAVE_INOTIFY
442"no-"
443#endif
Simon Kelley6b173352018-05-08 18:32:14 +0100444"inotify "
445#ifndef HAVE_DUMPFILE
446"no-"
447#endif
448"dumpfile";
Simon Kelleyc72daea2012-01-05 21:33:27 +0000449
450#endif
451
452
453