From 21458002d1cef8ea2ea500092c01ee628b4d34fd Mon Sep 17 00:00:00 2001 From: Shibby Date: Thu, 3 May 2012 14:09:09 +0700 Subject: [PATCH] Dnsmasq: 2.60 update --- release/src/router/dnsmasq/CHANGELOG | 111 +- release/src/router/dnsmasq/FAQ | 14 +- release/src/router/dnsmasq/Makefile | 235 ++-- release/src/router/dnsmasq/VERSION | 1 + release/src/router/dnsmasq/bld/Android.mk | 4 +- release/src/router/dnsmasq/bld/get-version | 28 + release/src/router/dnsmasq/bld/install-man | 2 +- release/src/router/dnsmasq/bld/install-mo | 2 +- release/src/router/dnsmasq/bld/pkg-wrapper | 4 +- release/src/router/dnsmasq/dnsmasq.conf.example | 29 +- release/src/router/dnsmasq/doc.html | 25 +- release/src/router/dnsmasq/man/dnsmasq.8 | 224 ++- release/src/router/dnsmasq/man/fr/dnsmasq.8 | 306 +++-- release/src/router/dnsmasq/po/de.po | 842 +++++++----- release/src/router/dnsmasq/po/es.po | 844 +++++++----- release/src/router/dnsmasq/po/fi.po | 819 ++++++----- release/src/router/dnsmasq/po/fr.po | 845 +++++++----- release/src/router/dnsmasq/po/id.po | 859 ++++++------ release/src/router/dnsmasq/po/it.po | 819 ++++++----- release/src/router/dnsmasq/po/no.po | 836 +++++++----- release/src/router/dnsmasq/po/pl.po | 840 +++++++----- release/src/router/dnsmasq/po/pt_BR.po | 819 ++++++----- release/src/router/dnsmasq/po/ro.po | 836 +++++++----- release/src/router/dnsmasq/src/bpf.c | 21 +- release/src/router/dnsmasq/src/cache.c | 183 ++- release/src/router/dnsmasq/src/config.h | 269 ++-- release/src/router/dnsmasq/src/conntrack.c | 3 +- release/src/router/dnsmasq/src/dbus.c | 2 +- release/src/router/dnsmasq/src/dhcp-common.c | 447 ++++++ .../src/{dhcp_protocol.h => dhcp-protocol.h} | 7 +- release/src/router/dnsmasq/src/dhcp.c | 323 ++--- release/src/router/dnsmasq/src/dhcp6-protocol.h | 67 + release/src/router/dnsmasq/src/dhcp6.c | 409 ++++++ .../dnsmasq/src/{dns_protocol.h => dns-protocol.h} | 5 +- release/src/router/dnsmasq/src/dnsmasq.c | 340 +++-- release/src/router/dnsmasq/src/dnsmasq.h | 195 ++- release/src/router/dnsmasq/src/forward.c | 56 +- release/src/router/dnsmasq/src/helper.c | 441 +++++- release/src/router/dnsmasq/src/lease.c | 492 +++++-- release/src/router/dnsmasq/src/log.c | 9 +- release/src/router/dnsmasq/src/netlink.c | 75 +- release/src/router/dnsmasq/src/network.c | 115 +- release/src/router/dnsmasq/src/option.c | 795 ++++++++--- release/src/router/dnsmasq/src/outpacket.c | 108 ++ release/src/router/dnsmasq/src/radv-protocol.h | 44 + release/src/router/dnsmasq/src/radv.c | 429 ++++++ release/src/router/dnsmasq/src/rfc1035.c | 4 +- release/src/router/dnsmasq/src/rfc2131.c | 285 +--- release/src/router/dnsmasq/src/rfc3315.c | 1431 ++++++++++++++++++++ release/src/router/dnsmasq/src/tftp.c | 28 +- release/src/router/dnsmasq/src/util.c | 46 +- 51 files changed, 10766 insertions(+), 5207 deletions(-) rewrite release/src/router/dnsmasq/Makefile (62%) create mode 100644 release/src/router/dnsmasq/VERSION create mode 100755 release/src/router/dnsmasq/bld/get-version create mode 100644 release/src/router/dnsmasq/src/dhcp-common.c rename release/src/router/dnsmasq/src/{dhcp_protocol.h => dhcp-protocol.h} (94%) create mode 100644 release/src/router/dnsmasq/src/dhcp6-protocol.h create mode 100644 release/src/router/dnsmasq/src/dhcp6.c rename release/src/router/dnsmasq/src/{dns_protocol.h => dns-protocol.h} (96%) create mode 100644 release/src/router/dnsmasq/src/outpacket.c create mode 100644 release/src/router/dnsmasq/src/radv-protocol.h create mode 100644 release/src/router/dnsmasq/src/radv.c create mode 100644 release/src/router/dnsmasq/src/rfc3315.c diff --git a/release/src/router/dnsmasq/CHANGELOG b/release/src/router/dnsmasq/CHANGELOG index 872dc60375..19f68617d7 100644 --- a/release/src/router/dnsmasq/CHANGELOG +++ b/release/src/router/dnsmasq/CHANGELOG @@ -1,18 +1,101 @@ +version 2.60 + Fix compilation problem in Mac OS X Lion. Thanks to Olaf + Flebbe for the patch. + + Fix DHCP when using --listen-address with an IP address + which is not the primary address of an interface. + + Add --dhcp-client-update option. + + Add Lua integration. Dnsmasq can now execute a DHCP + lease-change script written in Lua. This needs to be + enabled at compile time by setting HAVE_LUASCRIPT in + src/config.h or running "make COPTS=-DHAVE_LUASCRIPT" + Thanks to Jan-Piet Mens for the idea and proof-of-concept + implementation. + + Tidied src/config.h to distinguish between + platform-dependent compile-time options which are selected + automatically, and builder-selectable compile time + options. Document the latter better, and describe how to + set them from the make command line. + + Tidied up IPPROTO_IP/SOL_IP (and IPv6 equivalent) + confusion. IPPROTO_IP works everywhere now. + + Set TOS on DHCP sockets, this improves things on busy + wireless networks. Thanks to Dave Taht for the patch. + + Determine VERSION automatically based on git magic: + release tags or hash values. + + Improve start-up speed when reading large hosts files + containing many distinct addresses. + + Fix problem if dnsmasq is started without the stdin, + stdout and stderr file descriptors open. This can manifest + itself as 100% CPU use. Thanks to Chris Moore for finding + this. + + Fix shell-scripting bug in bld/pkg-wrapper. Thanks to + Mark Mitchell for the patch. + + Allow the TFP server or boot server in --pxe-service, to + be a domain name instead of an IP address. This allows for + round-robin to multiple servers, in the same way as + --dhcp-boot. A good suggestion from Cristiano Cumer. + + Support BUILDDIR variable in the Makefile. Allows builds + for multiple archs from the same source tree with eg. + make BUILDDIR=linux (relative to dnsmasq tree) + make BUILDDIR=/tmp/openbsd (absolute path) + If BUILDDIR is not set, compilation happens in the src + directory, as before. Suggestion from Mark Mitchell. + + Support DHCPv6. Support is there for the sort of things + the existing v4 server does, including tags, options, + static addresses and relay support. Missing is prefix + delegation, which is probably not required in the dnsmasq + niche, and an easy way to accept prefix delegations from + an upstream DHCPv6 server, which is. Future plans include + support for DHCPv6 router option and MAC address option + (to make selecting clients by MAC address work like IPv4). + These will be added as the standards mature. + This code has been tested, but this is the first release, + so don't bet the farm on it just yet. Many thanks to all + testers who have got it this far. + + Support IPv6 router advertisements. This is a + simple-minded implementation, aimed at providing the + vestigial RA needed to go alongside IPv6. Is picks up + configuration from the DHCPv6 conf, and should just need + enabling with --enable-ra. + + Fix long-standing wrinkle with --localise-queries that + could result in wrong answers when DNS packets arrive + via an interface other than the expected one. Thanks to + Lorenzo Milesi and John Hanks for spotting this one. + + Update French translation. Thanks to Gildas Le Nadan. + + Update Polish translation. Thanks to Jan Psota. + + version 2.59 - Fix regression in 2.58 which caused failure to start up - with some combinations of dnsmasq config and IPv6 kernel - network config. Thanks to Brielle Bruns for the bug - report. - - Improve dnsmasq's behaviour when network interfaces are - still doing duplicate address detection (DAD). Previously, - dnsmasq would wait up to 20 seconds at start-up for the - DAD state to terminate. This is broken for bridge - interfaces on recent Linux kernels, which don't start DAD - until the bridge comes up, and so can take arbitrary - time. The new behaviour lets dnsmasq poll for an arbitrary - time whilst providing service on other interfaces. Thanks - to Stephen Hemminger for pointing out the problem. + Fix regression in 2.58 which caused failure to start up + with some combinations of dnsmasq config and IPv6 kernel + network config. Thanks to Brielle Bruns for the bug + report. + + Improve dnsmasq's behaviour when network interfaces are + still doing duplicate address detection (DAD). Previously, + dnsmasq would wait up to 20 seconds at start-up for the + DAD state to terminate. This is broken for bridge + interfaces on recent Linux kernels, which don't start DAD + until the bridge comes up, and so can take arbitrary + time. The new behaviour lets dnsmasq poll for an arbitrary + time whilst providing service on other interfaces. Thanks + to Stephen Hemminger for pointing out the problem. version 2.58 diff --git a/release/src/router/dnsmasq/FAQ b/release/src/router/dnsmasq/FAQ index 3ab39eea10..b7c4f4b577 100644 --- a/release/src/router/dnsmasq/FAQ +++ b/release/src/router/dnsmasq/FAQ @@ -467,8 +467,18 @@ A: The DHCP client on windows Vista (and possibly later versions) work). - - +Q: DHCP doesn't work with windows 7 but everything else is fine. + +A: There seems to be a problem if Windows 7 doesn't get a value for + DHCP option 252 in DHCP packets it gets from the server. The + symtoms have beeen variously reported as continual DHCPINFORM + requests in an attempt to get an option-252, or even ignoring DHCP + offers completely (and failing to get an IP address) if there is no + option-252 supplied. DHCP option 252 is for WPAD, WWW Proxy + Auto Detection and if you don't want or need to use that, then + simplest fix seems to be to supply an empty option with: + + dhcp-option=252,"\n" diff --git a/release/src/router/dnsmasq/Makefile b/release/src/router/dnsmasq/Makefile dissimilarity index 62% index 4aa93be522..30e70a4af2 100644 --- a/release/src/router/dnsmasq/Makefile +++ b/release/src/router/dnsmasq/Makefile @@ -1,101 +1,134 @@ -# dnsmasq is Copyright (c) 2000-2011 Simon Kelley -# -# 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 -# the Free Software Foundation; version 2 dated June, 1991, or -# (at your option) version 3 dated 29 June, 2007. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -PREFIX = /usr/local -BINDIR = ${PREFIX}/sbin -MANDIR = ${PREFIX}/share/man -LOCALEDIR = ${PREFIX}/share/locale - -PKG_CONFIG = pkg-config -INSTALL = install -MSGMERGE = msgmerge -MSGFMT = msgfmt -XGETTEXT = xgettext - -CFLAGS = -Wall -W -O2 - -################################################################# - -SRC = src -PO = po -MAN = man - -DBUS_CFLAGS=`echo $(COPTS) | ../bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --cflags dbus-1` -DBUS_LIBS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1` -IDN_CFLAGS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags libidn` -IDN_LIBS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn` -CT_CFLAGS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack` -CT_LIBS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack` -SUNOS_LIBS= `if uname | grep SunOS 2>&1 >/dev/null; then echo -lsocket -lnsl -lposix4; fi` - -OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \ - dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \ - helper.o tftp.o log.o conntrack.o - -all : - @cd $(SRC) && $(MAKE) \ - BUILD_CFLAGS="$(DBUS_CFLAGS) $(IDN_CFLAGS) $(CT_CFLAGS)" \ - BUILD_LIBS="$(DBUS_LIBS) $(IDN_LIBS) $(CT_LIBS) $(SUNOS_LIBS)" \ - -f ../Makefile dnsmasq - -clean : - rm -f *~ $(SRC)/*.mo contrib/*/*~ */*~ $(SRC)/*.pot - rm -f $(SRC)/*.o $(SRC)/dnsmasq.a $(SRC)/dnsmasq core */core - -install : all install-common - -install-common : - $(INSTALL) -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8 - $(INSTALL) -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8 - $(INSTALL) -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR) - -all-i18n : - @cd $(SRC) && $(MAKE) \ - I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' \ - BUILD_CFLAGS="$(DBUS_CFLAGS) $(CT_CFLAGS) `$(PKG_CONFIG) --cflags libidn`" \ - BUILD_LIBS="$(DBUS_LIBS) $(CT_LIBS) $(SUNOS_LIBS) `$(PKG_CONFIG) --libs libidn`" \ - -f ../Makefile dnsmasq - @cd $(PO); for f in *.po; do \ - cd ../$(SRC) && $(MAKE) \ - -f ../Makefile $${f%.po}.mo; \ - done - -install-i18n : all-i18n install-common - cd $(SRC); ../bld/install-mo $(DESTDIR)$(LOCALEDIR) $(INSTALL) - cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR) $(INSTALL) - -merge : - @cd $(SRC) && $(MAKE) -f ../Makefile dnsmasq.pot - @cd $(PO); for f in *.po; do \ - echo -n msgmerge $$f && $(MSGMERGE) --no-wrap -U $$f ../$(SRC)/dnsmasq.pot; \ - done - - -# rules below are targets in recusive makes with cwd=$(SRC) - -.c.o: - $(CC) $(CFLAGS) $(COPTS) $(I18N) $(BUILD_CFLAGS) $(RPM_OPT_FLAGS) -c $< - -dnsmasq : $(OBJS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(BUILD_LIBS) $(LIBS) - -dnsmasq.pot : $(OBJS:.o=.c) dnsmasq.h config.h - $(XGETTEXT) -d dnsmasq --foreign-user --omit-header --keyword=_ -o $@ -i $(OBJS:.o=.c) - -%.mo : ../po/%.po dnsmasq.pot - $(MSGMERGE) -o - ../po/$*.po dnsmasq.pot | $(MSGFMT) -o $*.mo - - - -.PHONY : all clean install install-common all-i18n install-i18n merge +# dnsmasq is Copyright (c) 2000-2012 Simon Kelley +# +# 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 +# the Free Software Foundation; version 2 dated June, 1991, or +# (at your option) version 3 dated 29 June, 2007. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# NOTE: Building the i18n targets requires GNU-make + + +# Variables you may well want to override. + +PREFIX = /usr/local +BINDIR = $(PREFIX)/sbin +MANDIR = $(PREFIX)/share/man +LOCALEDIR = $(PREFIX)/share/locale +BUILDDIR = $(SRC) +DESTDIR = +CFLAGS = -Wall -W -O2 +LDFLAGS = +COPTS = +RPM_OPT_FLAGS = +LIBS = + +################################################################# + +# Variables you might want to override. + +PKG_CONFIG = pkg-config +INSTALL = install +MSGMERGE = msgmerge +MSGFMT = msgfmt +XGETTEXT = xgettext + +SRC = src +PO = po +MAN = man + +################################################################# + +# pmake way. (NB no spaces to keep gmake 3.82 happy) +top!=pwd +# GNU make way. +top?=$(CURDIR) + +dbus_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --cflags dbus-1` +dbus_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1` +idn_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags libidn` +idn_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn` +ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack` +ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack` +lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.1` +lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1` +sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi` +version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"' + +objs = cache.o rfc1035.o util.o option.o forward.o network.o \ + dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \ + helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \ + dhcp-common.o outpacket.o radv.o + +hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \ + dns-protocol.h radv-protocol.h + +all : $(BUILDDIR) + @cd $(BUILDDIR) && $(MAKE) \ + top="$(top)" \ + build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags)" \ + build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs)" \ + -f $(top)/Makefile dnsmasq + +clean : + rm -f *~ $(BUILDDIR)/*.mo contrib/*/*~ */*~ $(BUILDDIR)/*.pot + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a $(BUILDDIR)/dnsmasq core */core + +install : all install-common + +install-common : + $(INSTALL) -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8 + $(INSTALL) -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL) -m 755 $(BUILDDIR)/dnsmasq $(DESTDIR)$(BINDIR) + +all-i18n : $(BUILDDIR) + @cd $(BUILDDIR) && $(MAKE) \ + top="$(top)" \ + i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \ + build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) `$(PKG_CONFIG) --cflags libidn`" \ + build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) `$(PKG_CONFIG) --libs libidn`" \ + -f $(top)/Makefile dnsmasq + for f in `cd $(PO); echo *.po`; do \ + cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \ + done + +install-i18n : all-i18n install-common + cd $(BUILDDIR); $(top)/bld/install-mo $(DESTDIR)$(LOCALEDIR) $(INSTALL) + cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR) $(INSTALL) + +merge : + @cd $(BUILDDIR) && $(MAKE) -f $(top)/Makefile dnsmasq.pot + for f in `cd $(PO); echo *.po`; do \ + echo -n msgmerge $(PO)/$$f && $(MSGMERGE) --no-wrap -U $(PO)/$$f $(BUILDDIR)/dnsmasq.pot; \ + done + +$(BUILDDIR): + mkdir -p $(BUILDDIR) + + +# rules below are targets in recusive makes with cwd=$(SRC) + +$(objs:.o=.c) $(hdrs): + ln -s $(top)/$(SRC)/$@ . + +.c.o: + $(CC) $(CFLAGS) $(COPTS) $(i18n) $(build_cflags) $(RPM_OPT_FLAGS) -c $< + +dnsmasq : $(hdrs) $(objs) + $(CC) $(LDFLAGS) -o $@ $(objs) $(build_libs) $(LIBS) + +dnsmasq.pot : $(objs:.o=.c) $(hdrs) + $(XGETTEXT) -d dnsmasq --foreign-user --omit-header --keyword=_ -o $@ -i $(objs:.o=.c) + +%.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 diff --git a/release/src/router/dnsmasq/VERSION b/release/src/router/dnsmasq/VERSION new file mode 100644 index 0000000000..16c9907a08 --- /dev/null +++ b/release/src/router/dnsmasq/VERSION @@ -0,0 +1 @@ + (HEAD, v2.60, master) diff --git a/release/src/router/dnsmasq/bld/Android.mk b/release/src/router/dnsmasq/bld/Android.mk index f02657e514..a4bc610935 100644 --- a/release/src/router/dnsmasq/bld/Android.mk +++ b/release/src/router/dnsmasq/bld/Android.mk @@ -6,7 +6,9 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := bpf.c cache.c dbus.c dhcp.c dnsmasq.c \ forward.c helper.c lease.c log.c \ netlink.c network.c option.c rfc1035.c \ - rfc2131.c tftp.c util.c conntrack.c + rfc2131.c tftp.c util.c conntrack.c \ + dhcp6.c rfc3315.c dhcp-common.c outpacket.c \ + radv.c LOCAL_MODULE := dnsmasq diff --git a/release/src/router/dnsmasq/bld/get-version b/release/src/router/dnsmasq/bld/get-version new file mode 100755 index 0000000000..3b082dc541 --- /dev/null +++ b/release/src/router/dnsmasq/bld/get-version @@ -0,0 +1,28 @@ +#!/bin/sh + +# Determine the version string to build into a binary. +# When building in the git repository, we can use the output +# of "git describe" which gives an unequivocal answer. +# +# Failing that, we use the contents of the VERSION file +# which has a set of references substituted into it by git. +# If we can find one which matches $v[0-9].* then we assume it's +# a version-number tag, else we just use the whole string. + +if which git >/dev/null 2>&1 && [ -d $1/.git ]; then + cd $1; git describe +elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then +# unsubstituted VERSION, but no git available. + echo UNKNOWN +else + vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep $v[0-9]` + + if [ $? -eq 0 ]; then + echo "${vers}" | head -n 1 | tail -c +2 + else + cat $1/VERSION + fi +fi + +exit 0 + diff --git a/release/src/router/dnsmasq/bld/install-man b/release/src/router/dnsmasq/bld/install-man index f4cf3dcb48..420c9b1182 100755 --- a/release/src/router/dnsmasq/bld/install-man +++ b/release/src/router/dnsmasq/bld/install-man @@ -4,6 +4,6 @@ for f in *; do if [ -d $f ]; then $2 -m 755 -d $1/$f/man8 $2 -m 644 $f/dnsmasq.8 $1/$f/man8 - echo installing $1/$f/man8/dnsmasq.8 + echo installing $f/man8/dnsmasq.8 fi done diff --git a/release/src/router/dnsmasq/bld/install-mo b/release/src/router/dnsmasq/bld/install-mo index d11fa9f84b..ab54301419 100755 --- a/release/src/router/dnsmasq/bld/install-mo +++ b/release/src/router/dnsmasq/bld/install-mo @@ -3,7 +3,7 @@ for f in *.mo; do $2 -m 755 -d $1/${f%.mo}/LC_MESSAGES $2 -m 644 $f $1/${f%.mo}/LC_MESSAGES/dnsmasq.mo - echo installing $1/${f%.mo}/LC_MESSAGES/dnsmasq.mo + echo installing ${f%.mo}/LC_MESSAGES/dnsmasq.mo done diff --git a/release/src/router/dnsmasq/bld/pkg-wrapper b/release/src/router/dnsmasq/bld/pkg-wrapper index 4f3b76be28..a29871e524 100755 --- a/release/src/router/dnsmasq/bld/pkg-wrapper +++ b/release/src/router/dnsmasq/bld/pkg-wrapper @@ -3,8 +3,8 @@ search=$1 shift -if grep "^\#.*define.*$search" config.h 2>&1 >/dev/null || \ - grep $search 2>&1 >/dev/null ; then +if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \ + grep $search >/dev/null 2>&1; then exec $* fi diff --git a/release/src/router/dnsmasq/dnsmasq.conf.example b/release/src/router/dnsmasq/dnsmasq.conf.example index 21f9519a28..43d8d01a07 100644 --- a/release/src/router/dnsmasq/dnsmasq.conf.example +++ b/release/src/router/dnsmasq/dnsmasq.conf.example @@ -157,6 +157,17 @@ # an explicit netmask instead. #dhcp-range=192.168.0.0,static +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h + # Supply parameters for specified hosts using DHCP. There are lots # of valid alternatives, so we will give examples of each. Note that # IP addresses DO NOT have to be in the range given above, they just @@ -219,7 +230,13 @@ # any machine with Ethernet address starting 11:22:33: #dhcp-host=11:22:33:*:*:*,set:red -# Ignore any clients which are specified in dhcp-host lines +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] + +# Ignore any clients which are not specified in dhcp-host lines # or /etc/ethers. Equivalent to ISC "deny unknown-clients". # This relies on the special "known" tag which is set when # a host is matched. @@ -270,6 +287,13 @@ # Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 #dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] + +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] + # Set the NTP time server address to be the same machine as # is running dnsmasq #dhcp-option=42,0.0.0.0 @@ -304,6 +328,9 @@ #dhcp-option=45,0.0.0.0 # netbios datagram distribution server #dhcp-option=46,8 # netbios node type +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" + # Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client # probably doesn't support this...... #dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com diff --git a/release/src/router/dnsmasq/doc.html b/release/src/router/dnsmasq/doc.html index 0a73083845..66d2b4c1f0 100644 --- a/release/src/router/dnsmasq/doc.html +++ b/release/src/router/dnsmasq/doc.html @@ -27,7 +27,7 @@ connection but would be a good choice for any smallish network (up to 1000 clients is known to work) where low resource use and ease of configuration are important.

-Supported platforms include Linux (with glibc and uclibc), *BSD, +Supported platforms include Linux (with glibc and uclibc), Android, *BSD, Solaris and Mac OS X. Dnsmasq is included in at least the following Linux distributions: Gentoo, Debian, Slackware, Suse, Fedora, @@ -88,24 +88,19 @@ for any or all local machines. -

Download.

+

Get code.

- Download dnsmasq here. +Download dnsmasq here. The tarball includes this documentation, source, and manpage. There is also a CHANGELOG and a FAQ. -Dnsmasq is part of the Debian distribution, it can be downloaded from - here or installed using apt. -

Links.

-Damien Raude-Morvan has an article in French at http://www.drazzib.com/docs-dnsmasq.html -There is a good article about dnsmasq at http://www.enterprisenetworkingplanet.com/netos/article.php/3377351 -and another at http://www.linux.com/articles/149040 -and Ilya Evseev has an article in Russian about dnsmasq to be found at - -http://ilya-evseev.narod.ru/articles/dnsmasq. Ismael Ull has an -article about dnsmasq in Spanish at http://www.mey-online.com.ar/blog/index.php/archives/guia-rapida-de-dnsmasq +Dnsmasq has a git repository which contains the complete release +history of version 2 and development history from 2.60. You can +browse +the repo, or get a copy using git protocol with the command + +
git clone git://thekelleys.org.uk/dnsmasq.git 
+

License.

Dnsmasq is distributed under the GPL. See the file COPYING in the distribution for details. diff --git a/release/src/router/dnsmasq/man/dnsmasq.8 b/release/src/router/dnsmasq/man/dnsmasq.8 index f3168bce17..81f5fd98f6 100644 --- a/release/src/router/dnsmasq/man/dnsmasq.8 +++ b/release/src/router/dnsmasq/man/dnsmasq.8 @@ -51,7 +51,7 @@ apply to domain names in cnames, PTR records, TXT records etc. .B \-T, --local-ttl=