From: Simon Kelley Date: Tue, 13 Oct 2009 16:49:32 +0000 (+0100) Subject: import of dnsmasq-2.51.tar.gz X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f15b81d610eb7c9612814603221d25871927833;p=people%2Fms%2Fdnsmasq.git import of dnsmasq-2.51.tar.gz --- diff --git a/CHANGELOG b/CHANGELOG index ad398a7..89209d5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,78 @@ +version 2.51 + Add support for internationalised DNS. Non-ASCII characters + in domain names found in /etc/hosts, /etc/ethers and + /etc/dnsmasq.conf will be correctly handled by translation to + punycode, as specified in RFC3490. This function is only + available if dnsmasq is compiled with internationalisation + support, and adds a dependency on GNU libidn. Without i18n + support, dnsmasq continues to be compilable with just + standard tools. Thanks to Yves Dorfsman for the + suggestion. + + Add two more environment variables for lease-change scripts: + First, DNSMASQ_SUPPLIED_HOSTNAME; this is set to the hostname + supplied by a client, even if the actual hostname used is + over-ridden by dhcp-host or dhcp-ignore-names directives. + Also DNSMASQ_RELAY_ADDRESS which gives the address of + a DHCP relay, if used. + Suggestions from Michael Rack. + + Fix regression which broke echo of relay-agent + options. Thanks to Michael Rack for spotting this. + + Don't treat option 67 as being interchangeable with + dhcp-boot parameters if it's specified as + dhcp-option-force. + + Make the code to call scripts on lease-change compile-time + optional. It can be switched off by editing src/config.h + or building with "make COPTS=-DNO_SCRIPT". + + Make the TFTP server cope with filenames from Windows/DOS + which use '\' as pathname separator. Thanks to Ralf for + the patch. + + Updated Polish translation. Thanks to Jan Psota. + + Warn if an IP address is duplicated in /etc/ethers. Thanks + to Felix Schwarz for pointing this out. + + Teach --conf-dir to take an option list of file suffices + which will be ignored when scanning the directory. Useful + for backup files etc. Thanks to Helmut Hullen for the + suggestion. + + Add new DHCP option named tftpserver-address, which + corresponds to the third argument of dhcp-boot. This + allows the complete functionality of dhcp-boot to be + replicated with dhcp-option. Useful when using + dhcp-optsfile. + + Test which upstream nameserver to use every 10 seconds + or 50 queries and not just when a query times out and + is retried. This should improve performance when there + is a slow nameserver in the list. Thanks to Joe for the + suggestion. + + Don't do any PXE processing, even for clients with the + correct vendorclass, unless at least one pxe-prompt or + pxe-service option is given. This stops dnsmasq + interfering with proxy PXE subsystems when it is just + the DHCP server. Thanks to Spencer Clark for spotting this. + + Limit the blocksize used for TFTP transfers to a value + which avoids packet fragmentation, based on the MTU of the + local interface. Many netboot ROMs can't cope with + fragmented packets. + + Honour dhcp-ignore configuration for PXE and proxy-PXE + requests. Thanks to Niels Basjes for the bug report. + + Updated French translation. Thanks to Gildas Le Nadan. + + version 2.50 - Fix security problem which allowed any host permitted to + Fix security problem which allowed any host permitted to do TFTP to possibly compromise dnsmasq by remote buffer overflow when TFTP enabled. Thanks to Core Security Technologies and Iván Arce, Pablo Hernán Jorge, Alejandro @@ -358,3 +431,8 @@ version 2.43 ports. Thanks to Patrick McLean for spotting this. Updated French translation. Thanks to Gildas Le Nadan. + + +version 2.42 + The changelog for version 2.42 and earlier is + available in CHANGELOG.archive. diff --git a/Makefile b/Makefile index 1ae250f..3d07c24 100644 --- a/Makefile +++ b/Makefile @@ -24,18 +24,22 @@ MAN = man PKG_CONFIG = pkg-config INSTALL = install +MSGMERGE = msgmerge +MSGFMT = msgfmt +XGETTEXT = xgettext -DBUS_CFLAGS="`echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --cflags dbus-1`" -DBUS_LIBS=" `echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --libs dbus-1`" -SUNOS_LIBS=" `if uname | grep SunOS 2>&1 >/dev/null; then echo -lsocket -lnsl -lposix4; fi `" +################################################################# + +DNSMASQ_CFLAGS=`echo $(COPTS) | ../bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --cflags dbus-1` +DNSMASQ_LIBS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1` +SUNOS_LIBS= `if uname | grep SunOS 2>&1 >/dev/null; then echo -lsocket -lnsl -lposix4; fi` all : dnsmasq dnsmasq : - cd $(SRC) && $(MAKE) \ - DBUS_CFLAGS=$(DBUS_CFLAGS) \ - DBUS_LIBS=$(DBUS_LIBS) \ - SUNOS_LIBS=$(SUNOS_LIBS) \ + @cd $(SRC) && $(MAKE) \ + DNSMASQ_CFLAGS="$(DNSMASQ_CFLAGS)" \ + DNSMASQ_LIBS="$(DNSMASQ_LIBS) $(SUNOS_LIBS)" \ -f ../bld/Makefile dnsmasq clean : @@ -50,24 +54,25 @@ install-common : $(INSTALL) -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR) all-i18n : - cd $(SRC) && $(MAKE) \ + @cd $(SRC) && $(MAKE) \ I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' \ - DBUS_CFLAGS=$(DBUS_CFLAGS) \ - DBUS_LIBS=$(DBUS_LIBS) \ - SUNOS_LIBS=$(SUNOS_LIBS) \ + DNSMASQ_CFLAGS="$(DNSMASQ_CFLAGS) `$(PKG_CONFIG) --cflags libidn`" \ + DNSMASQ_LIBS="$(DNSMASQ_LIBS) $(SUNOS_LIBS) `$(PKG_CONFIG) --libs libidn`" \ -f ../bld/Makefile dnsmasq - cd $(PO); for f in *.po; do \ - cd ../$(SRC) && $(MAKE) -f ../bld/Makefile $${f%.po}.mo; \ + @cd $(PO); for f in *.po; do \ + cd ../$(SRC) && $(MAKE) \ + MSGMERGE=$(MSGMERGE) MSGFMT=$(MSGFMT) XGETTEXT=$(XGETTEXT) \ + -f ../bld/Makefile $${f%.po}.mo; \ done install-i18n : all-i18n install-common - cd $(SRC); ../bld/install-mo $(DESTDIR)$(LOCALEDIR) - cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR) + cd $(SRC); ../bld/install-mo $(DESTDIR)$(LOCALEDIR) $(INSTALL) + cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR) $(INSTALL) merge : - $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq.pot - cd $(PO); for f in *.po; do \ - msgmerge --no-wrap -U $$f ../$(SRC)/dnsmasq.pot; \ + @cd $(SRC) && $(MAKE) XGETTEXT=$(XGETTEXT) -f ../bld/Makefile dnsmasq.pot + @cd $(PO); for f in *.po; do \ + echo -n msgmerge $$f && $(MSGMERGE) --no-wrap -U $$f ../$(SRC)/dnsmasq.pot; \ done diff --git a/bld/Makefile b/bld/Makefile index c6c91cb..53dab34 100644 --- a/bld/Makefile +++ b/bld/Makefile @@ -5,13 +5,13 @@ OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \ helper.o tftp.o log.o .c.o: - $(CC) $(CFLAGS) $(COPTS) $(DBUS_MINOR) $(I18N) $(DBUS_CFLAGS) $(SUNOS_VER) $(RPM_OPT_FLAGS) -c $< + $(CC) $(CFLAGS) $(COPTS) $(I18N) $(DNSMASQ_CFLAGS) $(RPM_OPT_FLAGS) -c $< dnsmasq : $(OBJS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(DBUS_LIBS) $(SUNOS_LIBS) $(LIBS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(DNSMASQ_LIBS) $(LIBS) dnsmasq.pot : $(OBJS:.o=.c) dnsmasq.h config.h - xgettext -d dnsmasq --foreign-user --keyword=_ -o dnsmasq.pot -i $(OBJS:.o=.c) + $(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 - + $(MSGMERGE) -o - ../po/$*.po dnsmasq.pot | $(MSGFMT) -o $*.mo - diff --git a/bld/install-man b/bld/install-man index f6dea75..f4cf3dc 100755 --- a/bld/install-man +++ b/bld/install-man @@ -2,8 +2,8 @@ for f in *; do if [ -d $f ]; then - install -m 755 -d $1/$f/man8 - install -m 644 $f/dnsmasq.8 $1/$f/man8 + $2 -m 755 -d $1/$f/man8 + $2 -m 644 $f/dnsmasq.8 $1/$f/man8 echo installing $1/$f/man8/dnsmasq.8 fi done diff --git a/bld/install-mo b/bld/install-mo index e6d462a..d11fa9f 100755 --- a/bld/install-mo +++ b/bld/install-mo @@ -1,8 +1,8 @@ #!/bin/sh for f in *.mo; do - install -m 755 -d $1/${f%.mo}/LC_MESSAGES - install -m 644 $f $1/${f%.mo}/LC_MESSAGES/dnsmasq.mo + $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 done diff --git a/bld/pkg-wrapper b/bld/pkg-wrapper index 66859e2..4f3b76b 100755 --- a/bld/pkg-wrapper +++ b/bld/pkg-wrapper @@ -1,7 +1,10 @@ #!/bin/sh -if grep "^\#.*define.*HAVE_DBUS" config.h 2>&1 >/dev/null || \ - grep HAVE_DBUS 2>&1 >/dev/null ; then +search=$1 +shift + +if grep "^\#.*define.*$search" config.h 2>&1 >/dev/null || \ + grep $search 2>&1 >/dev/null ; then exec $* fi diff --git a/dnsmasq.conf.example b/dnsmasq.conf.example index 1b3202f..ac9ef7a 100644 --- a/dnsmasq.conf.example +++ b/dnsmasq.conf.example @@ -396,6 +396,11 @@ # the user dnsmasq is running as will be send over the net. #tftp-secure +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize + # Set the boot file name only when the "red" tag is set. #dhcp-boot=net:red,pxelinux.red-net diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 index c7b98ad..a5eac63 100644 --- a/man/dnsmasq.8 +++ b/man/dnsmasq.8 @@ -45,7 +45,8 @@ additional hosts file. If a directory is given, then read all the files containe .TP .B \-E, --expand-hosts Add the domain to simple names (without a period) in /etc/hosts -in the same way as for DHCP-derived names. +in the same way as for DHCP-derived names. Note that this does not +apply to domain names in cnames, PTR records, TXT records etc. .TP .B \-T, --local-ttl=