diff --git a/.gitignore b/.gitignore index f357b6e..fcdbcbd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ src/*.o src/*.mo src/dnsmasq.pot src/dnsmasq +src/dnsmasq_baseline src/.configured contrib/wrt/dhcp_lease_time contrib/wrt/dhcp_release diff --git a/CHANGELOG b/CHANGELOG index 78b9316..77acde2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -90,8 +90,6 @@ version 2.67 smallest valid dhcp-range is sent. Thanks to Uwe Schindler for suggesting this. - Add --force-fast-ra option. Another thanks to Uwe Schindler. - Make --listen-address higher priority than --except-interface in all circumstances. Thanks to Thomas Hood for the bugreport. @@ -101,7 +99,60 @@ version 2.67 (provide TFTP to the same interfaces we provide DHCP to) is retained. Thanks to Lonnie Abelbeck for the suggestion. + Add --dhcp-relay config option. Many thanks to vtsl.net + for sponsoring this development. + Fix crash with empty tag: in --dhcp-range. Thanks to + Kaspar Schleiser for the bug report. + + Add "baseline" and "bloatcheck" makefile targets, for + revealing size changes during development. Thanks to + Vladislav Grishenko for the patch. + + Cope with DHCPv6 clients which send REQUESTs without + address options - treat them as SOLICIT with rapid commit. + + Support identification of clients by MAC address in + DHCPv6. When using a relay, the relay must support RFC + 6939 for this to work. It always works for directly + connected clients. Thanks to Vladislav Grishenko + for prompting this feature. + + Remove the rule for constructed DHCP ranges that the local + address must be either the first or last address in the + range. This was originally to avoid SLAAC addresses, but + we now explicitly autoconfig and privacy addresses instead. + + Update Polish translation. Thanks to Jan Psota. + + Fix problem in DHCPv6 vendorclass/userclass matching + code. Thanks to Tanguy Bouzeloc for the patch. + + Update Spanish transalation. Thanks to Vicente Soriano. + + Add --ra-param option. Thanks to Vladislav Grishenko for + inspiration on this. + + Add --add-subnet configuration, to tell upstream DNS + servers where the original client is. Thanks to DNSthingy + for sponsoring this feature. + + Add --quiet-dhcp, --quiet-dhcp6 and --quiet-ra. Thanks to + Kevin Darbyshire-Bryant for the initial patch. + + Allow A/AAAA records created by --interface-name to be the + target of --cname. Thanks to Hadmut Danisch for the + suggestion. + + Avoid treating a --dhcp-host which has an IPv6 address + as eligable for use with DHCPv4 on the grounds that it has + no address, and vice-versa. Thanks to Yury Konovalov for + spotting the problem. + + Do a better job caching dangling CNAMEs. Thanks to Yves + Dorfsman for spotting the problem. + + version 2.66 Add the ability to act as an authoritative DNS server. Dnsmasq can now answer queries from the wider 'net diff --git a/Makefile b/Makefile index ab9c179..61c22c9 100644 --- a/Makefile +++ b/Makefile @@ -80,10 +80,14 @@ all : $(BUILDDIR) build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(ssl_libs)" \ -f $(top)/Makefile dnsmasq -clean : - rm -f *~ $(BUILDDIR)/*.mo contrib/*/*~ */*~ $(BUILDDIR)/*.pot +mostly_clean : + rm -f $(BUILDDIR)/*.mo $(BUILDDIR)/*.pot rm -f $(BUILDDIR)/.configured $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a $(BUILDDIR)/dnsmasq - rm -rf core */core + +clean : mostly_clean + rm -f $(BUILDDIR)/dnsmasq_baseline + rm -f core */core + rm -f *~ contrib/*/*~ */*~ install : all install-common @@ -113,9 +117,24 @@ merge : echo -n msgmerge $(PO)/$$f && $(MSGMERGE) --no-wrap -U $(PO)/$$f $(BUILDDIR)/dnsmasq.pot; \ done +# Cannonicalise .po file. +%.po : + @cd $(BUILDDIR) && $(MAKE) -f $(top)/Makefile dnsmasq.pot + mv $(PO)/$*.po $(PO)/$*.po.orig && $(MSGMERGE) --no-wrap $(PO)/$*.po.orig $(BUILDDIR)/dnsmasq.pot >$(PO)/$*.po; + $(BUILDDIR): mkdir -p $(BUILDDIR) +# rules below are helpers for size tracking + +baseline : mostly_clean all + @cd $(BUILDDIR) && \ + mv dnsmasq dnsmasq_baseline + +bloatcheck : $(BUILDDIR)/dnsmasq_baseline mostly_clean all + @cd $(BUILDDIR) && \ + $(top)/bld/bloat-o-meter dnsmasq_baseline dnsmasq; \ + size dnsmasq_baseline dnsmasq # rules below are targets in recusive makes with cwd=$(BUILDDIR) @@ -129,7 +148,7 @@ $(objs:.o=.c) $(hdrs): .c.o: $(CC) $(CFLAGS) $(COPTS) $(i18n) $(build_cflags) $(RPM_OPT_FLAGS) -c $< -dnsmasq : .configured $(hdrs) $(objs) +dnsmasq : .configured $(hdrs) $(objs) $(CC) $(LDFLAGS) -o $@ $(objs) $(build_libs) $(LIBS) dnsmasq.pot : $(objs:.o=.c) $(hdrs) @@ -138,5 +157,4 @@ dnsmasq.pot : $(objs:.o=.c) $(hdrs) %.mo : $(top)/$(PO)/%.po dnsmasq.pot $(MSGMERGE) -o - $(top)/$(PO)/$*.po dnsmasq.pot | $(MSGFMT) -o $*.mo - - -.PHONY : all clean install install-common all-i18n install-i18n merge +.PHONY : all clean mostly_clean install install-common all-i18n install-i18n merge baseline bloatcheck diff --git a/bld/bloat-o-meter b/bld/bloat-o-meter new file mode 100755 index 0000000..6db2a5e --- /dev/null +++ b/bld/bloat-o-meter @@ -0,0 +1,130 @@ +#!/usr/bin/env python +# +# Copyright 2004 Matt Mackall +# +# Inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen +# +# This software may be used and distributed according to the terms +# of the GNU General Public License, incorporated herein by reference. + +import sys, os#, re + +def usage(): + sys.stderr.write("usage: %s [-t] file1 file2\n" % sys.argv[0]) + sys.exit(-1) + +f1, f2 = (None, None) +flag_timing, dashes = (False, False) + +for f in sys.argv[1:]: + if f.startswith("-"): + if f == "--": # sym_args + dashes = True + break + if f == "-t": # timings + flag_timing = True + else: + if not os.path.exists(f): + sys.stderr.write("Error: file '%s' does not exist\n" % f) + usage() + if f1 is None: + f1 = f + elif f2 is None: + f2 = f +if flag_timing: + import time +if f1 is None or f2 is None: + usage() + +sym_args = " ".join(sys.argv[3 + flag_timing + dashes:]) +def getsizes(file): + sym, alias, lut = {}, {}, {} + for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines(): + l = l.strip() + if not (len(l) and l[0].isdigit() and len(l.split()) == 8): + continue + num, value, size, typ, bind, vis, ndx, name = l.split() + if ndx == "UND": continue # skip undefined + if typ in ["SECTION", "FILES"]: continue # skip sections and files + if "." in name: name = "static." + name.split(".")[0] + value = int(value, 16) + size = int(size, 16) if size.startswith('0x') else int(size) + if vis != "DEFAULT" and bind != "GLOBAL": # see if it is an alias + alias[(value, size)] = {"name" : name} + else: + sym[name] = {"addr" : value, "size": size} + lut[(value, size)] = 0 + for addr, sz in iter(alias.keys()): + # If the non-GLOBAL sym has an implementation elsewhere then + # it's an alias, disregard it. + if not (addr, sz) in lut: + # If this non-GLOBAL sym does not have an implementation at + # another address, then treat it as a normal symbol. + sym[alias[(addr, sz)]["name"]] = {"addr" : addr, "size": sz} + for l in os.popen("readelf -W -S " + file).readlines(): + x = l.split() + if len(x)<6: continue + # Should take these into account too! + #if x[1] not in [".text", ".rodata", ".symtab", ".strtab"]: continue + if x[1] not in [".rodata"]: continue + sym[x[1]] = {"addr" : int(x[3], 16), "size" : int(x[5], 16)} + return sym + +if flag_timing: + start_t1 = int(time.time() * 1e9) +old = getsizes(f1) +if flag_timing: + end_t1 = int(time.time() * 1e9) + start_t2 = int(time.time() * 1e9) +new = getsizes(f2) +if flag_timing: + end_t2 = int(time.time() * 1e9) + start_t3 = int(time.time() * 1e9) +grow, shrink, add, remove, up, down = 0, 0, 0, 0, 0, 0 +delta, common = [], {} + +for name in iter(old.keys()): + if name in new: + common[name] = 1 + +for name in old: + if name not in common: + remove += 1 + sz = old[name]["size"] + down += sz + delta.append((-sz, name)) + +for name in new: + if name not in common: + add += 1 + sz = new[name]["size"] + up += sz + delta.append((sz, name)) + +for name in common: + d = new[name].get("size", 0) - old[name].get("size", 0) + if d>0: grow, up = grow+1, up+d + elif d<0: shrink, down = shrink+1, down-d + else: + continue + delta.append((d, name)) + +delta.sort() +delta.reverse() +if flag_timing: + end_t3 = int(time.time() * 1e9) + +print("%-48s %7s %7s %+7s" % ("function", "old", "new", "delta")) +for d, n in delta: + if d: + old_sz = old.get(n, {}).get("size", "-") + new_sz = new.get(n, {}).get("size", "-") + print("%-48s %7s %7s %+7d" % (n, old_sz, new_sz, d)) +print("-"*78) +total="(add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s)%%sTotal: %s bytes"\ + % (add, remove, grow, shrink, up, -down, up-down) +print(total % (" "*(80-len(total)))) +if flag_timing: + print("\n%d/%d; %d Parse origin/new; processing nsecs" % + (end_t1-start_t1, end_t2-start_t2, end_t3-start_t3)) + print("total nsecs: %d" % (end_t3-start_t1)) diff --git a/bld/get-version b/bld/get-version index 15e5051..c246a3c 100755 --- a/bld/get-version +++ b/bld/get-version @@ -12,7 +12,7 @@ # first. This favours, eg v2.63 over 2.63rc6. if which git >/dev/null 2>&1 && [ -d $1/.git ]; then - cd $1; git describe + cd $1; git describe | sed 's/^v//' elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then # unsubstituted VERSION, but no git available. echo UNKNOWN diff --git a/contrib/mactable/macscript b/contrib/mactable/macscript new file mode 100755 index 0000000..44a4477 --- /dev/null +++ b/contrib/mactable/macscript @@ -0,0 +1,36 @@ +#!/bin/bash + +STATUS_FILE="/tmp/dnsmasq-ip-mac.status" + +# Script for dnsmasq lease-change hook. +# Maintains the above file with a IP address/MAC address pairs, +# one lease per line. Works with IPv4 and IPv6 leases, file is +# atomically updated, so no races for users of the data. + +action="$1" +mac="$2" # IPv4 +ip="$3" + +# ensure it always exists. + +if [ ! -f "$STATUS_FILE" ]; then + touch "$STATUS_FILE" +fi + +if [ -n "$DNSMASQ_IAID" ]; then + mac="$DNSMASQ_MAC" # IPv6 +fi + +# worry about an add or old action when the MAC address is not known: +# leave any old one in place in that case. + +if [ "$action" = "add" -o "$action" = "old" -o "$action" = "del" ]; then + if [ -n "$mac" -o "$action" = "del" ]; then + sed "/^${ip//./\.} / d" "$STATUS_FILE" > "$STATUS_FILE".new + + if [ "$action" = "add" -o "$action" = "old" ]; then + echo "$ip $mac" >> "$STATUS_FILE".new + fi + mv "$STATUS_FILE".new "$STATUS_FILE" # atomic update. + fi +fi diff --git a/debian/changelog b/debian/changelog index f0ddd66..20f0a7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ dnsmasq (2.67-1) unstable; urgency=low * New upstream. + * Update resolvconf script. (closes: #720732) -- Simon Kelley Wed, 4 Aug 2013 14:53:22 +0000 diff --git a/debian/control b/debian/control index 3f673a3..f25bbdb 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.9.3 Package: dnsmasq Architecture: all -Depends: netbase, dnsmasq-base(>= ${source:Version}) +Depends: netbase, dnsmasq-base(>= ${binary:Version}) Suggests: resolvconf Conflicts: resolvconf (<<1.15) Description: Small caching DNS proxy and DHCP/TFTP server diff --git a/debian/readme b/debian/readme index cb5f7c9..73705d8 100644 --- a/debian/readme +++ b/debian/readme @@ -64,7 +64,9 @@ Notes on configuring dnsmasq as packaged for Debian. noi18n : omit translations and internationalisation support. noidn : omit international domain name support, must be combined with noi18n to be effective. - + gitversion : set the version of the produced packages from the + git-derived versioning information on the source, + rather the the debian changelog. (9) Dnsmasq comes as three packages - dnsmasq-utils, dnsmasq-base and dnsmasq. Dnsmasq-base provides the dnsmasq executable and diff --git a/debian/resolvconf b/debian/resolvconf index 80f3a64..c15cb29 100644 --- a/debian/resolvconf +++ b/debian/resolvconf @@ -16,8 +16,7 @@ set -e RUN_DIR="/var/run/dnsmasq" RSLVRLIST_FILE="${RUN_DIR}/resolv.conf" TMP_FILE="${RSLVRLIST_FILE}_new.$$" -MY_RECORD_NAME="lo.dnsmasq" -DNSCRYPT_RECORD_NAME="lo.dnscrypt" +MY_NAME_FOR_RESOLVCONF="dnsmasq" [ -x /usr/sbin/dnsmasq ] || exit 0 [ -x /lib/resolvconf/list-records ] || exit 1 @@ -46,14 +45,14 @@ if [ ! -d "$RUN_DIR" ] && ! mkdir --parents --mode=0755 "$RUN_DIR" ; then fi RSLVCNFFILES="" -for F in $(/lib/resolvconf/list-records --after "$MY_RECORD_NAME") ; do +for F in $(/lib/resolvconf/list-records --after "lo.$MY_NAME_FOR_RESOLVCONF") ; do case "$F" in - "$MY_RECORD_NAME") - # Omit + "lo.$MY_NAME_FOR_RESOLVCONF") + # Omit own record ;; - "$DNSCRYPT_RECORD_NAME") - # Dnscrypt, I only have eyes for you - RSLVCNFFILES="$DNSCRYPT_RECORD_NAME" + lo.*) + # Include no more records after one for a local nameserver + RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F" break ;; *) diff --git a/debian/rules b/debian/rules index e658683..7b9f4da 100755 --- a/debian/rules +++ b/debian/rules @@ -23,6 +23,11 @@ TARGET = install-i18n DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +# Force package version based on git tags. +ifneq (,$(filter gitversion,$(DEB_BUILD_OPTIONS))) + PACKAGE_VERSION = $(shell bld/get-version `pwd` | sed 's/test/~&/; s/[a-z]/~&/; s/-/./g; s/$$/-1/; s/^/-v/';) +endif + ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS))) COPTS += -DHAVE_DBUS endif @@ -103,7 +108,7 @@ binary-indep: checkroot install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq ln -s $(package) debian/daemon/usr/share/doc/dnsmasq cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums - dpkg-gencontrol -pdnsmasq -Pdebian/daemon + dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/daemon chown -R root.root debian/daemon chmod -R g-ws debian/daemon dpkg --build debian/daemon .. @@ -150,8 +155,8 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) strip -R .note -R .comment debian/base/usr/sbin/dnsmasq endif cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums - dpkg-shlibdeps debian/base/usr/sbin/dnsmasq - dpkg-gencontrol -pdnsmasq-base -Pdebian/base + dpkg-shlibdeps --warnings=1 debian/base/usr/sbin/dnsmasq + dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base chown -R root.root debian/base chmod -R g-ws debian/base dpkg --build debian/base .. @@ -178,7 +183,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) endif cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums dpkg-shlibdeps -Tdebian/utils-substvars debian/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time - dpkg-gencontrol -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils + dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils chown -R root.root debian/utils chmod -R g-ws debian/utils dpkg --build debian/utils .. diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 index 4357d99..123c98f 100644 --- a/man/dnsmasq.8 +++ b/man/dnsmasq.8 @@ -497,7 +497,7 @@ Return an NAPTR DNS record, as specified in RFC3403. Return a CNAME record which indicates that is really . There are significant limitations on the target; it must be a DNS name which is known to dnsmasq from /etc/hosts (or additional -hosts files), from DHCP or from another +hosts files), from DHCP, from --interface-name or from another .B --cname. If the target does not satisfy this criteria, the whole cname is ignored. The cname must be unique, but it @@ -543,7 +543,20 @@ server. The MAC address can only be added if the requestor is on the same subnet as the dnsmasq server. Note that the mechanism used to achieve this (an EDNS0 option) is not yet standardised, so this should be considered experimental. Also note that exposing MAC addresses in this way may -have security and privacy implications. +have security and privacy implications. The warning about caching +given for --add-subnet applies to --add-mac too. +.TP +.B --add-subnet[[=],] +Add the subnet address of the requestor to the DNS queries which are +forwarded upstream. The amount of the address forwarded depends on the +prefix length parameter: 32 (128 for IPv6) forwards the whole address, +zero forwards none of it but still marks the request so that no +upstream nameserver will add client address information either. The +default is zero for both IPv4 and IPv6. Note that upstream nameservers +may be configured to return different results based on this +information, but the dnsmasq cache does not take account. If a dnsmasq +instance is configured such that different results may be encountered, +caching should be disabled. .TP .B \-c, --cache-size= Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching. @@ -652,24 +665,20 @@ This forms a template which describes how to create ranges, based on the address .B --dhcp-range=::1,::400,constructor:eth0 -will look for addresses of the form ::1 or :400 on +will look for addresses on eth0 and then create a range from ::1 to ::400. If the interface is assigned more than one network, then the corresponding ranges will be automatically created, and then deprecated and finally removed again as the address is deprecated and then deleted. The interface name may have a final "*" wildcard. Note -that just any address on eth0 will not do: the non-prefix part must be -equal either the start or end address given in the dhcp-range. This is -to prevent prefixes becoming perpetual if the interface -gains a SLAAC address for the prefix when it is advertised by dnsmasq. +that just any address on eth0 will not do: it must not be an +autoconfigured or privacy address, or be deprecated. If a dhcp-range is only being used for stateless DHCP and/or SLAAC, then the address can be simply :: .B --dhcp-range=::,constructor:eth0 -This removes the condition above, and will pick up the prefix from any address on eth0 which is NOT -autoconfigured, slaac, temporary or deprecated. There is a variant of the constructor: syntax using the keyword .B constructor-noauth. @@ -766,7 +775,8 @@ the same subnet as some valid dhcp-range. For subnets which don't need a pool of dynamically allocated addresses, use the "static" keyword in the dhcp-range declaration. -It is allowed to use client identifiers rather than +It is allowed to use client identifiers (called client +DUID in IPv6-land rather than hardware addresses to identify hosts by prefixing with 'id:'. Thus: .B --dhcp-host=id:01:02:03:04,..... refers to the host with client identifier 01:02:03:04. It is also @@ -781,11 +791,12 @@ IPv6 addresses may contain only the host-identifier part: .B --dhcp-host=laptop,[::56] in which case they act as wildcards in constructed dhcp ranges, with the appropriate network part inserted. -Note that in IPv6 DHCP, the hardware address is not normally -available, so a client must be identified by client-id (called client -DUID in IPv6-land) or hostname. +Note that in IPv6 DHCP, the hardware address may not be +available, though it normally is for direct-connected clients, or +clients using DHCP relays which support RFC 6939. -The special option id:* means "ignore any client-id + +For DHCPv4, the special option id:* means "ignore any client-id and use MAC addresses only." This is useful when a client presents a client-id sometimes but not others. @@ -973,6 +984,38 @@ DHCP options. This make extra space available in the DHCP packet for options but can, rarely, confuse old or broken clients. This flag forces "simple and safe" behaviour to avoid problems in such a case. .TP +.B --dhcp-relay=,[,,[enterprise:,] Map from a vendor-class string to a tag. Most DHCP clients provide a "vendor class" which represents, in some sense, the type of host. This option @@ -1001,7 +1044,7 @@ this to set a different printer server for hosts in the class "accounts" than for hosts in the class "engineering". .TP .B \-4, --dhcp-mac=set:, -(IPv4 only) Map from a MAC address to a tag. The MAC address may include +Map from a MAC address to a tag. The MAC address may include wildcards. For example .B --dhcp-mac=set:3com,01:34:23:*:*:* will set the tag "3com" for any host whose MAC address matches the pattern. @@ -1217,6 +1260,11 @@ tried. This flag disables this check. Use with caution. Extra logging for DHCP: log all the options sent to DHCP clients and the tags used to determine them. .TP +.B --quiet-dhcp, --quiet-dhcp6, --quiet-ra +Suppress logging of the routine operation of these protocols. Errors and +problems will still be logged. --quiet-dhcp and quiet-dhcp6 are +over-ridden by --log-dhcp. +.TP .B \-l, --dhcp-leasefile= Use the specified file to store DHCP lease information. .TP @@ -1307,7 +1355,7 @@ every call to the script. DNSMASQ_IAID containing the IAID for the lease. If the lease is a temporary allocation, this is prefixed to 'T'. - +DNSMASQ_MAC containing the MAC address of the client, if known. Note that the supplied hostname, vendorclass and userclass data is only supplied for @@ -1495,11 +1543,19 @@ the relevant link-local address of the machine running dnsmasq is sent as recursive DNS server. If provided, the DHCPv6 options dns-server and domain-search are used for RDNSS and DNSSL. .TP -.B --force-fast-ra -Normally, dnsmasq advertises a new IPv6 prefix frequently (every 10 seconds or so) for the first minute, and then -drops back to sending "maintenance" advertisements every 10 minutes or so. This option forces dnsmasq to be always in -frequent RA mode. It's a bug workaround for mobile devices which go deaf to RAs during sleep and therefore -lose conectivity; with frequent RAs they recover in a reasonable time after wakeup. +.B --ra-param=,[high|low],[[],] +Set non-default values for router advertisements sent via an +interface. The priority field for the router may be altered from the +default of medium with eg +.B --ra-param=eth0,high. +The interval between router advertisements may be set (in seconds) with +.B --ra-param=eth0,60. +The lifetime of the route may be changed or set to zero, which allows +a router to advertise prefixes but not a route via itself. +.B --ra-parm=eth0,0,0 +(A value of zero for the interval means the default value.) All three parameters may be set at once. +.B --ra-param=low,60,1200 +The interface field may include a wildcard. .TP .B --enable-tftp[=[,]] Enable the TFTP server function. This is deliberately limited to that diff --git a/man/fr/dnsmasq.8 b/man/fr/dnsmasq.8 index 2ae0d09..0de4333 100644 --- a/man/fr/dnsmasq.8 +++ b/man/fr/dnsmasq.8 @@ -403,7 +403,8 @@ noms de domains entourés par des '/', selon une syntaxe similaire à l'option Ne pas vérifier régulièrement si le fichier /etc/resolv.conf a été modifié. .TP .B --clear-on-reload -Lorsque le fichier /etc/resolv.conf est relu, vider le cache DNS. +Lorsque le fichier /etc/resolv.conf est relu, ou si les serveurs amonts sont +configurés via DBus, vider le cache DNS. Cela est utile si les nouveaux serveurs sont susceptibles d'avoir des données différentes de celles stockées dans le cache. .TP @@ -596,9 +597,9 @@ Retourne un enregistrement de type NAPTR, tel que spécifié dans le RFC3403. .TP .B --cname=, Retourne un enregistrement de type CNAME qui indique que est en -réalité . Il existe des contraintes significatives sur la valeur -de cible; il doit s'agir d'un nom DNS qui est connu de dnsmasq via /etc/hosts -(ou un fichier hôtes additionnel), ou via DHCP, ou par un autre +réalité . Il existe des contraintes importantes sur la valeur +cible; il doit s'agir d'un nom DNS qui est connu de dnsmasq via /etc/hosts +(ou un fichier hôtes additionnel), via DHCP, via interface--name ou par un autre .B --cname. Si une cible ne satisfait pas ces critères, le CNAME est ignoré. Le CNAME doit être unique, mais il est autorisé d'avoir plus d'un CNAME pointant @@ -622,6 +623,24 @@ Plus d'un nom peut être associé à une interface donnée en répétant cette o plusieurs fois; dans ce cas, l'enregistrement inverse pointe vers le nom fourni dans la première instance de cette option. .TP +.B --synth-domain=,[,] +Créé des enregistrements A/AAAA ou PTR pour une plage d'adresses. Les +enregistrements utilisent l'adresse ainsi que les points (ou les deux points +dans le cas d'IPv6) remplacés par des tirets. + +Un exemple devrait rendre cela plus clair : +La configuration +.B --synth-domain=thekelleys.org.uk,192.168.0.0/24,internal- +permet de retourner internal-192-168-0-56.thekelleys.org.uk lors d'une requête +sur l'adresse 192.168.0.56 et vice-versa pour la requête inverse. La même +logique s'applique pour IPv6, avec la particularité suivante : les adresses +IPv6 pouvant commencer par '::', mais les noms DNS ne pouvant pas commencer +par '-', si aucun préfixe n'est donné, un zéro est ajouté en début de nom. +Ainsi, ::1 devient 0--1. + +La plage d'adresses peut-être de la forme +, ou / +.TP .B --add-mac Ajoute l'adresse MAC du requêteur aux requêtes DNS transmises aux serveurs amonts. Cela peut être utilisé dans un but de filtrage DNS par les serveurs @@ -630,7 +649,20 @@ même sous-réseau que le serveur dnsmasq. Veuillez noter que le mécanisme utilisé pour effectuer cela (une option EDNS0) n'est pas encore standardisée, aussi cette fonctionalité doit être considérée comme expérimentale. Notez également qu'exposer les adresses MAC de la sorte peut avoir des implications -en termes de sécurité et de vie privée. +en termes de sécurité et de vie privée. L'avertissement donné pour --add-subnet +s'applique également ici. +.TP +.B --add-subnet[[=],] +Rajoute l'adresse de sous-réseau du requêteur aux requêtes DNS transmises +aux serveurs amonts. La quantité d'adresses transmises dépend du paramètre +longueur du préfixe : 32 (ou 128 dans le cas d'IPv6) transmet la totalité +de l'adresse, 0 n'en transmet aucun mais marque néanmoins la requête ce qui +fait qu'aucun serveur amont ne rajoutera d'adresse client. La valeur par +défaut est zéro et pour IPv4 et pour IPv6. A noter que les serveurs amonts +peuvent-être configurés pour retourner des valeurs différentes en fonction +de cette information mais que le cache de dnsmasq n'en tient pas compte. +Si une instance de dnsmasq est configurée de telle maniêre que des valeurs +différentes pourraient-être rencontrés, alors le cache devrait être désactivé. .TP .B \-c, --cache-size= Définit la taille du cache de Dnsmasq. La valeur par défaut est de 150 noms. @@ -665,15 +697,20 @@ Si vous utilisez le premier mode DNSSEC, la validation par le resolveur des clients, cette option n'est pas requise. Dnsmasq retourne toujours toutes les données nécessaires par un client pour effectuer la validation lui-même. .TP -.B --auth-zone=[,[,.....]] + +.B --auth-zone=[,[/][,[/].....]] Définie une zone DNS pour laquelle dnsmasq agit en temps que serveur faisant autorité. Les enregistrements DNS définis localement et correspondant à ce -domaine seront fournis, à ceci près que les enregistrements A et AAAA doivent -se situer dans l'un des sous-réseaux précisés si ceux-ci sont définis, ou dans -un réseau correspondant à une plage DHCP. Le ou les sous-réseaux sont également -utilisé pour définir les domaines in-addr.arpa et ipv6.arpa servant à -l'interrogation DNS inverse. Dans le cas d'IPv4, la longueur du masque de -réseau doit être de 8, 16 ou 24. +domaine seront fournis. Les enregistrements A et AAAA doivent se situer dans +l'un des sous-réseaux définis, ou dans un réseau correspondant à une plage DHCP +(ce comportement peut-être désactivé par +.B constructor-noauth: +). Le ou les sous-réseaux sont également utilisé(s) pour définir les domaines +in-addr.arpa et ipv6.arpa servant à l'interrogation DNS inverse. Si la longueur +de préfixe n'est pas spécifiée, elle sera par défaut de 24 pour IPv4 et 64 pour +IPv6. Dans le cas d'IPv4, la longueur du masque de réseau devrait-être de 8, 16 +ou 24, sauf si en cas de mise en place d'une délégation de la zone in-addr.arpa +conforme au RFC 2317. .TP .B --auth-soa=[,[,[,[,]]]] Spécifie les champs de l'enregistrement de type SOA (Start Of Authority) @@ -762,6 +799,27 @@ rendues obsolètes puis supprimées lorsque l'adress est rendue obsolète puis supprimée. Le nom de l'interface peut être spécifié avec un caractère joker '*' final. +provoque la recherche d'adresses sur eth0 et crée une plage allant de +::1 à :400. Si l'interface est assignée à +plus d'un réseau, les plages correspondantes seront respectivement +automatiquement créées, rendues obsolètes et supprimées lorsque l'adresse +est rendue obsolète et supprimée. Le nom de l'interface peut être spécifié avec +un caractère joker '*' final. Les adresses autoconfigurées, privées ou +obsolètes ne conviennent pas. + +Si une plage dhcp-range est uniquement utilisée pour du DHCP sans-état +("stateless") ou de l'autoconfiguration sans état ("SLAAC"), alors l'adresse +peut-être indiquée sous la forme '::' + +.B --dhcp-range=::,constructor:eth0 + +Il existe une variante de la syntaxe constructor: qui consiste en l'utilisation +du mot-clef +.B constructor-noauth. +Voir +.B --auth-zone +pour des explications à ce sujet. + L'identifiant de label optionnel .B set: