Subject: pkg/34428: [update] net/dnsmasq
To: None <,,>
From: Martin Wilke <>
List: pkgsrc-bugs
Date: 08/30/2006 18:20:01
>Number:         34428
>Category:       pkg
>Synopsis:       [update] net/dnsmasq
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 30 18:20:01 +0000 2006
>Originator:     Martin Wilke
>Release:        NetBSD 4.0_BETA i386

System: NetBSD 4.0_BETA (MIWIBOX) #0: Tue Aug 29 10:29:38 CEST 2006


- Update to 2.33
- Remove patch-aa 
- Could remove from TODO

- Changelog
	     Remove bash-specific shellcode from the Makefile.

	    Fix breakage with some DHCP relay implementations which
	    was introduced in 2.28. Believing the source port in
	    DHCP requests and sending the reply there is sometimes a
	    bad thing to do, so I've reverted to always sending to
	    the relay on port 68. Thanks to Daniel Hamlin and Alex
	    (alde) for bug reports on this.

	    Moved the SuSe packaging files to contrib. I will no
	    longer attempt to maintain this in the source tarball. It
	    will be done externally, in the same way as packaging for
	    other distros. Suse packages are available from
	    Merged patch from Gentoo to honour $LDFLAGS environment.

	    Fix bug in resolv.conf processing when more than one file
	    is being checked.

	    Add --dns-forward-max option.

	    Warn if --resolv-file flags are ignored because of
	    --no-resolv. Thanks to Martin F Krafft for spotting this

            Add --leasefile-ro option which allows the use of an 
            external lease database. Many thanks to Steve Horbachuk 
	    for assistance developing this feature.

	    Provide extra information to lease-change script via its
	    environment. If the host has a client-id, then
	    DNSMASQ_CLIENT_ID will be set. Either the lease length (in
	    DNSMASQ_LEASE_LENGTH) or lease expiry time (in
	    DNSMASQ_LEASE_EXPIRES) will be set, depending on the
	    HAVE_BROKEN_RTC compile-time option. This extra
	    information should make it possible to maintain the lease
	    database in external storage such as LDAP or a relational
	    database. Note that while leasefile-ro is set, the script
            will be called with "old"  events more often, since 
	    changes to the client-id and lease length
	    (HAVE_BROKEN_RTC) or lease expiry time (otherwise) 
	    are now flagged. 

	    Add contrib/wrt/* which is an example implementation of an
	    external persistent lease database for *WRT distros with 
	    the nvram command.

	    Add contrib/wrt/dhcp_release.c which is a small utility 
	    which removes DHCP leases using DHCPRELEASE operation in
	    the DHCP protocol.

version 2.24
            Updated contrib/openvpn/dnsmasq.patch from Joseph Tate.

	    Tweaked DHCP NAK code, a DHCP NAK is now unicast as a
	    fallback in cases where a broadcast is futile: namely in
	    response to a unicast REQUEST from a non-local network
	    which was not sent via a relay.

	    Slightly changed the semantics of domain matching in
	    --server and --address configs. --server=/ still
	    matches and but does not 
	    now match The semantics of 
            --server=/ are unchanged. 
	    Thanks to Chris Blaise for the patch.

	    Added backwards-compatible internationalisation support.
	    The existing make targets, (all, dnsmasq, install) work as
	    before. New ones (all-i18n, and install-i18n) add gettext.
	    The translations live in po/ There are not too many
	    strings, so if anybody can provide translations (and for
	    the manpage....) please send them in.

	    Tweak behaviour on receipt of REFUSED or SERVFAIL rcodes,
	    now the query gets retried on all servers before returning
	    the error to the source of the query. Thanks to Javier
	    Kohen for the report.
	    Added Polish translation - thanks to Tomasz Sochanski.

	    Changed default manpage install location from /usr/man 
	    to /usr/share/man 

	    Added Spanish translation - thanks to Christopher Chatham.

	    Log a warning when a DHCP packet is truncated due to lack
	    of space. (Thanks to Michael Welle for the prompt to do
	    Added French translation - thanks to Lionel Tricon.

	    Added Indonesian translation - thanks to Salman AS.

	    Tweaked the netlink code to cope with interface broadcast
	    address not set, or set to

	    Fixed problem assigning fixed addresses to hosts when more
	    than one dhcp-range is available. Thanks to Sorin Panca
	    for help chasing this down.

	    Added more explict error mesages to the hosts file and
	    ethers file reading code. Markus Kaiserswerth suffered to
	    make this happen.

	    Ensure that a hostname supplied by a DHCP client can never
	    override one configured on the server. Previously, any
	    host claiming a name would be given it, even if that
	    over-rode a dhcp-host declaration, leading to potentially 
            confusing situations.

	    Added Slackware package-build stuff into contrib/ The i18n
	    effort broke the current scripts, and working ones were
	    needed for testing, so they ended up here rather than make
	    Pat re-invent the wheel.
	    Added Romanian translation, thanks to Sorin Panca for

version 2.25
            Fixed RedHat spec file for FC4 - thanks to Werner Hoelzl
            and Andrew Bird.

            Fixed Suse spec file - thanks to Steven Springl.

	    Fixed DHCP bug when two distict subnets are on the same
	    physical interface. Thanks to Pawel Zawora for finding
	    this and suggesting the fix.

	    Added logging to make it explicit when dnsmasq falls back
	    from using RT-netlink sockets to the old ioctl API for
	    getting information about interfaces. Doing this
	    completely silently made remote debugging hard.

	    Merged uclibc build fixes from the OpenWRT package into

	    Added Norwegian translation - thanks to Jan Erik Askildt.

version 2.26
	    Fixed SuSe rpm patch problem - thanks to Steven Springl.

	    Fixed crash when attempting to send a DHCP NAK to a host
	    which believes it has a lease on an unknown
	    network. Thanks to Lutz Pressler for the bug report and

version 2.27
	    Tweaked DHCP behaviour when a client attempts to renew a lease
            which dnsmasq doesn't know about. Previously that would always
            result in a DHCPNAK. Now, in dhcp-authoritative mode, the
            lease will be created, if it's legal. This makes dnsmasq work
            better if the lease database is lost, for example on an OpenWRT
	    system which reboots. Thanks to Stephen Rose for work on

	    Added the ability to support RFC-3442 style destination
	    descriptors in dhcp-options. This makes classless static
	    routes easy to do, eg dhcp-option=121,,

	    Added error-checking to the code which writes the lease
	    file. If this fails for any reason, an error is logged,
	    and a retry occurs after one minute. This should improve
	    things eg when a filesystem is full. Thanks to Jens Holze
	    for the bug report.

	    Fixed breakage of the "/#/ matches any domain" facility
	    which happened in 2.24. Thanks to Peter Surda for the bug

	    Use "size_t" and "ssize_t" types where appropriate in the

	    Fix buggy CNAME handling in mixed IPv4 and IPv6
	    queries. Thanks to Andreas Pelme for help finding that.

	    Added some code to attempt to re-transmit DNS queries when 
	    a network interface comes up.  This helps on DoD links, 
	    where frequently the packet which triggers dialling is
            a DNS query, which then gets lost. By re-sending, we can 
	    avoid the lookup failing. This function is only active
	    when netlink support is compiled in, and therefore only
	    under Linux. Thanks to Jean Wolter for help with this.

	    Tweaked the DHCP tag-matching code to work correctly with
	    NOT-tag conditions. Thanks to Lutz Pressler for finding
	    the bug.

	    Generalised netid-tag matching in dhcp-range statements to
	    allow more than one tag.

	    Added --dhcp-mac to do MAC address matching in the same
	    way as vendorclass and userclass matching. A good
	    suggestion from Lutz Pressler.

	    Add workaround for buggy early Microsoft DHCP clients
	    which need zero-termination in string options.
	    Thanks to Fabiano Pires for help with this.

	    Generalised the DHCP code to cope with any hardware
	    address type, at least on Linux. *BSD is still limited to
	    ethernet only.

version 2.28
            Eliminated all raw network access when running on
            Linux. All DHCP network activity now goes through the IP
            stack. Packet sockets are no longer required. Apart from
            being a neat hack, this should also allow DHCP over IPsec
            to work better. On *BSD and OS X, the old method of raw net
            access through BPF is retained.

	    Simplified build options. Networking is now slimmed down
	    to a choice of "linux" or "other". Netlink is always used
	    under Linux. Since netlink has been available since 2.2
	    and non-optional in an IPv4-configured  kernel since 2.4,
	    and the dnsmasq netlink code is now well tested, this 
	    should work out fine. 

	    Removed decayed build support for libc5 and Solaris.
	    Removed pselect code: use a pipe for race-free signal
	    handling instead, as this works everywhere.

	    No longer enable the ISC leasefile reading code in the
	    distributed sources. I doubt there are many people left
	    using this 1.x compatibility code. Those that are will
	    have to explicitly enable it in src/config.h.

	    Don't send the "DHCP maximum message size" option, even if 
	    requested. RFC2131 says this is a "MUST NOT".

	    Support larger-than-minimum DHCP message. Dnsmasq is now
	    happy to get larger than 576-byte DHCP messages, and will
	    return large messages, if permitted by the "maximum
	    message size" option of the message to which it is
	    replying. There's now an arbitrary sanity limit of 16384

	    Added --no-ping option. This fixes an RFC2131 "SHOULD".

	    Building on the 2.27 MAC-address changes, allow clients to 
	    provide no MAC address at all, relying on the client-id as
	    a unique identifier. This should make things like DHCP for
	    USB come easier.

	    Fixed regression in netlink code under 2.2.x kernels which 
	    occurred in 2.27. Erik Jan Tromp is the vintage kernel fan 
	    who found this. P.S. It looks like this "netlink bind:
	    permission denied" problem occured in kernels at least as
	    late a 2.4.18. Good information from Alain Richoux.

	    Added a warning when it's impossible to give a host its
	    configured address because the address is leased
	    elsewhere.  A sensible suggestion from Mircea Bardac.

	    Added minimal support for RFC 3046 DHCP relay agent-id
	    options. The DHCP server now echoes these back to the
	    relay, as required by the RFC. Also, RFC 3527 link selection 
	    sub-options are honoured.

	    Set the process "dumpable" flag when running in debug
	    mode: this makes getting core dumps from root processes
	    much easier.
	    Fixed one-byte buffer overflow which seems to only cause
	    problems when dnsmasq is linked with uclibc. Thanks to
	    Eric House and Eric Spakman for help in chasing this down.

	    Tolerate configuration screwups which lead to the DHCP
	    server attemping to allocate its own address to a
	    client; eg setting the whole subnet range as a DHCP
	    range. Addresses in use by the server are now excluded
	    from use by clients.

	    Did some thinking about HAVE_BROKEN_RTC mode, and made it
	    much simpler and better. The key is to just keep lease
	    lengths in the lease file. Since these normally never
	    change, even as the lease is renewed, the lease file never
	    needs to change except when machines arrive on the network
	    or leave. This eliminates the code for timed writes, and
	    reduces the amount of wear on a flash filesystem to the
	    absolute minimum. Also re-did the basic time function in
	    this mode to use the portable times(), rather than parsing

	    Believe the source port number when replying to unicast 
	    DHCP requests and DHCP requests via a relay, instead of always 
            using the standard ports.  This will allow relays on 
            non-standard ports and DHCPINFORM from unprivileged ports
            to work. The source port sent by unconfigured clients is still 
            ignored, since this may be unreliable. This means that a DHCP 
            client must use the standard port to do full configuration.
version 2.29
	    Fixed compilation on OpenBSD (thanks to Tom Hensel for the

	    Fixed false "no interface" errors when --bind-interfaces is
	    set along with --interface=lo or --listen-address. Thanks
	    to Paul Wise for the report.

	    Updated patch for SuSE rpm. Thanks to Steven Springl.

	    It turns out that there are some Linux kernel
	    configurations which make using the capability system
	    impossible. If this situation occurs then continue, running
	    as root, and log a warning. Thanks to Scott Wehrenberg
	    for help tracking this down.

version 2.30
            Fixed crash when a DHCP client requested a broadcast
            reply. This problem was introduced in version 2.28.
	    Thanks to Sandra Dekkers for the bug report.

version 2.31
	    Added --dhcp-script option. There have been calls for this
	    for a long time from many good people. Fabio Muzzi gets
	    the prize for finally convincing me.

	    Added example dbus config file and moved dbus stuff into
	    its own directory.

	    Removed horribly outdated Redhat RPM build files. These
	    are obsolete now that dnsmasq in in Fedora extras. Thanks
	    to Patrick "Jima" Laughton, the Fedora package

	    Added workaround for Linux kernel bug. This manifests
	    itself as failure of DHCP on kernels with "support for
	    classical IP over ATM" configured. That includes most
	    Debian kernel packages. Many thanks to A. Costa and
	    Benjamin Kudria for their huge efforts in chasing this

	    Force-kill child processes when dnsmasq is sent a sigterm,
	    otherwise an unclosed TCP connection could keep dnsmasq
	    hanging round for a few minutes.

	    Tweaked config.h logic for uclibc build. It will now pick
	    up MMU and IPV6 status correctly on every system I tested.

version 2.32 
	    Attempt a better job of replacing previous configuration
	    when re-reading /etc/hosts and /etc/ethers. SIGHUP is
	    still not identical to a restart under all circumstances,
	    but it is for the common case of name->MAC address in
	    /etc/ethers and name->IP address in /etc/hosts.

	    Fall back to broadcast for DHCP to an unconfigured client
	    when the MAC address size is greater than 14 bytes.

	    Fix problem in 2.28-onwards releases which breaks DNS on
	    Mac OS X. Thanks to Doug Fields for the bug report and

	    Added fix to allow compilation on c89-only compilers.
	    Thanks to John Mastwijk for the patch.
	    Tweak resolv file polling code to work better if there is
	    a race between updating the mtime and file contents. This
	    is not normally a problem, but it can be on systems which
	    replace nameservers whilst active. The code now continues
	    to read resolv.conf until it gets at least one usable
	    server. Thanks to Holger Mauermann for help with this.

	    If a client DECLINEs an address which is allocated to it
	    via dhcp-host or /etc/hosts, lock that address out of use
	    for ten minutes, instead of forever, and log when it's not
	    being used because of the lock-out. This should provide
	    less surprising behaviour when a configured address can't be
	    used. Thanks to Peter Surda and Heinz Deinhart for input
	    on this.

	    Fixed *BSD DHCP breakage with only some
	    arches/compilers, depending on structure padding rules.
	    Thanks to Jeb Campbell and Tom Hensel for help with this.

	    Added --conf-dir option. Suggestion from Aaron Tygart.

	    Applied patch from Brent Cook which allows netids in
	    dhcp-option configuration lines to be prefixed by
	    "net:". This is not required by the syntax, but it is
	    consistent with other configuration items.

	    Added --log-facility option. Suggestion from Fabio Muzzi.

	    Major update to Spanish translation. Many thanks to Chris

	    Fixed gcc-4.1 strict-alias compilation warning.



--- dnsmasq.diff begins here ---
Index: Makefile
RCS file: /home/pcvs/pkgsrc/net/dnsmasq/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	5 Feb 2006 23:10:23 -0000	1.3
+++ Makefile	30 Aug 2006 15:07:29 -0000
@@ -1,8 +1,7 @@
 # $NetBSD: Makefile,v 1.3 2006/02/05 23:10:23 joerg Exp $
-DISTNAME=		dnsmasq-2.23
+DISTNAME=		dnsmasq-2.33
Index: PLIST
RCS file: /home/pcvs/pkgsrc/net/dnsmasq/PLIST,v
retrieving revision
diff -u -r1.1.1.1 PLIST
--- PLIST	18 Oct 2005 04:41:59 -0000
+++ PLIST	30 Aug 2006 15:06:37 -0000
@@ -1,6 +1,7 @@
 @comment $NetBSD: PLIST,v 2005/10/18 04:41:59 minskim Exp $
+@dirrm share/man/man8
 @dirrm share/examples/dnsmasq
Index: distinfo
RCS file: /home/pcvs/pkgsrc/net/dnsmasq/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	22 Mar 2006 15:59:56 -0000	1.2
+++ distinfo	30 Aug 2006 14:50:28 -0000
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.2 2006/03/22 15:59:56 joerg Exp $
-SHA1 (dnsmasq-2.23.tar.gz) = 6ddeaaa9b7a457d65c8d02980a69ccbd08925acc
-RMD160 (dnsmasq-2.23.tar.gz) = 3ba342790e1912828a5bb389abfa4679e4d93c2c
-Size (dnsmasq-2.23.tar.gz) = 159102 bytes
+SHA1 (dnsmasq-2.33.tar.gz) = a470a8ded17dee490302c53d04a5ad61b147b377
+RMD160 (dnsmasq-2.33.tar.gz) = ce50b7791546800537bcb4b1fddf41a185b2bda3
+Size (dnsmasq-2.33.tar.gz) = 227113 bytes
 SHA1 (patch-aa) = 2450048934b3102ee47a4af26ec279162c414302
Index: patches/patch-aa
RCS file: /home/pcvs/pkgsrc/net/dnsmasq/patches/patch-aa,v
retrieving revision 1.1
diff -u -r1.1 patch-aa
--- patches/patch-aa	22 Mar 2006 15:59:56 -0000	1.1
+++ patches/patch-aa	30 Aug 2006 15:07:41 -0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2006/03/22 15:59:56 joerg Exp $
---- src/config.h.orig	2006-03-22 15:55:31.000000000 +0000
-+++ src/config.h
-@@ -32,7 +32,7 @@
- #  define RESOLVFILE "/etc/resolv.conf"
- #endif
- #define RUNFILE "/var/run/"
--#if defined(__FreeBSD__) || defined (__OpenBSD__)
-+#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__DragonFly__)
- #   define LEASEFILE "/var/db/dnsmasq.leases"
- #else
- #   define LEASEFILE "/var/lib/misc/dnsmasq.leases"
-@@ -276,7 +276,7 @@ typedef unsigned long in_addr_t; 
- #endif
- #endif
--#elif defined(__FreeBSD__) || defined(__OpenBSD__)
-+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
- /* Later verions of FreeBSD have getopt_long() */
--- dnsmasq.diff ends here ---