From 96f09fab4929c6ddde5c9113f1b2476ad37133c4 Mon Sep 17 00:00:00 2001 From: Jonathan Zarate Date: Tue, 29 Jun 2010 01:17:43 -0400 Subject: [PATCH] Tomato 1.28 --- release/src/router/Makefile | 2 +- release/src/router/busybox/.config | 2 +- release/src/router/dnsmasq/CHANGELOG | 183 ++- release/src/router/dnsmasq/FAQ | 10 + .../router/dnsmasq/contrib/Solaris10/README-sparc | 8 + .../dnsmasq/contrib/Solaris10/create_package | 2 +- .../router/dnsmasq/contrib/static-arp/static-arp | 35 + release/src/router/dnsmasq/dnsmasq.conf.example | 46 +- release/src/router/dnsmasq/man/dnsmasq.8 | 368 ++++-- release/src/router/dnsmasq/man/es/dnsmasq.8 | 397 +++++-- release/src/router/dnsmasq/man/fr/dnsmasq.8 | 432 ++++--- release/src/router/dnsmasq/po/de.po | 1252 ++++++++++---------- release/src/router/dnsmasq/po/es.po | 631 +++++----- release/src/router/dnsmasq/po/fi.po | 616 +++++----- release/src/router/dnsmasq/po/fr.po | 657 +++++----- release/src/router/dnsmasq/po/id.po | 640 +++++----- release/src/router/dnsmasq/po/it.po | 616 +++++----- release/src/router/dnsmasq/po/no.po | 632 +++++----- release/src/router/dnsmasq/po/pl.po | 644 +++++----- release/src/router/dnsmasq/po/pt_BR.po | 616 +++++----- release/src/router/dnsmasq/po/ro.po | 632 +++++----- release/src/router/dnsmasq/src/cache.c | 15 +- release/src/router/dnsmasq/src/config.h | 8 +- release/src/router/dnsmasq/src/dhcp.c | 157 ++- release/src/router/dnsmasq/src/dnsmasq.c | 83 +- release/src/router/dnsmasq/src/dnsmasq.h | 61 +- release/src/router/dnsmasq/src/forward.c | 169 ++- release/src/router/dnsmasq/src/helper.c | 9 +- release/src/router/dnsmasq/src/lease.c | 5 +- release/src/router/dnsmasq/src/log.c | 93 +- release/src/router/dnsmasq/src/netlink.c | 2 +- release/src/router/dnsmasq/src/network.c | 167 ++- release/src/router/dnsmasq/src/option.c | 406 +++++-- release/src/router/dnsmasq/src/rfc1035.c | 87 +- release/src/router/dnsmasq/src/rfc2131.c | 340 ++++-- release/src/router/dnsmasq/src/tftp.c | 126 +- release/src/router/httpd/tomato.c | 1 + 37 files changed, 5986 insertions(+), 4164 deletions(-) create mode 100644 release/src/router/dnsmasq/contrib/Solaris10/README-sparc create mode 100644 release/src/router/dnsmasq/contrib/static-arp/static-arp diff --git a/release/src/router/Makefile b/release/src/router/Makefile index 1672320d55..3178d88154 100644 --- a/release/src/router/Makefile +++ b/release/src/router/Makefile @@ -13,7 +13,7 @@ include common.mak -TOMATO_EXPERIMENTAL=1 +TOMATO_EXPERIMENTAL=0 # # diff --git a/release/src/router/busybox/.config b/release/src/router/busybox/.config index 100a0305e9..a9fde32276 100644 --- a/release/src/router/busybox/.config +++ b/release/src/router/busybox/.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Busybox version: 1.14.4 -# Mon May 3 20:35:39 2010 +# Sun Jun 27 20:11:16 2010 # CONFIG_HAVE_DOT_CONFIG=y diff --git a/release/src/router/dnsmasq/CHANGELOG b/release/src/router/dnsmasq/CHANGELOG index d857065b36..3739541865 100644 --- a/release/src/router/dnsmasq/CHANGELOG +++ b/release/src/router/dnsmasq/CHANGELOG @@ -1,3 +1,179 @@ +version 2.55 + Fix crash when /etc/ethers is in use. Thanks to + Gianluigi Tiesi for finding this. + + Fix crash in netlink_multicast(). Thanks to Arno Wald for + finding this one. + + Allow the empty domain "." in dhcp domain-search (119) + options. + + +version 2.54 + There is no version 2.54 to avoid confusion with 2.53, + which incorrectly identifies itself as 2.54. + + +version 2.53 + Fix failure to compile on Debian/kFreeBSD. Thanks to + Axel Beckert and Petr Salinger. + + Fix code to avoid scary strict-aliasing warnings + generated by gcc 4.4. + + Added FAQ entry warning about DHCP failures with Vista + when firewalls block 255.255.255.255. + + Fixed bug which caused bad things to happen if a + resolv.conf file which exists is subsequently removed. + Thanks to Nikolai Saoukh for the patch. + + Rationalised the DHCP tag system. Every configuration item + which can set a tag does so by adding "set:" and + every configuration item which is conditional on a tag is + made so by "tag:". The NOT operator changes to '!', + which is a bit more intuitive too. Dhcp-host directives + can set more than one tag now. The old '#' NOT, + "net:" prefix and no-prefixes are still honoured, so + no existing config file needs to be changed, but + the documentation and new-style config files should be + much less confusing. + + Added --tag-if to allow boolean operations on tags. + This allows complicated logic to be clearer and more + general. A great suggestion from Richard Voigt. + + Add broadcast/unicast information to DHCP logging. + + Allow --dhcp-broadcast to be unconditional. + + Fixed incorrect behaviour with NOT conditionals in + dhcp-options. Thanks to Max Turkewitz for assistance + finding this. + + If we send vendor-class encapsulated options based on the + vendor-class supplied by the client, and no explicit + vendor-class option is given, echo back the vendor-class + from the client. + + Fix bug which stopped dnsmasq from matching both a + circuitid and a remoteid. Thanks to Ignacio Bravo for + finding this. + + Add --dhcp-proxy, which makes it possible to configure + dnsmasq to use a DHCP relay agent as a full proxy, with + all DHCP messages passing through the proxy. This is + useful if the relay adds extra information to the packets + it forwards, but cannot be configured with the RFC 5107 + server-override option. + + Added interface: part to dhcp-range. The + semantics of this are very odd at first sight, but it + allows a single line of the form + dhcp-range=interface:virt0,192.168.0.4,192.168.0.200 + to be added to dnsmasq configuration which then supplies + DHCP and DNS services to that interface, without affecting + what services are supplied to other interfaces and + irrespective of the existance or lack of + interface= + lines elsewhere in the dnsmasq configuration. The idea is + that such a line can be added automatically by libvirt + or equivalent systems, without disturbing any manual + configuration. + + Similarly to the above, allow --enable-tftp= + + Allow a TFTP root to be set separately for requests via + different interfaces, --tftp-root=, + + Correctly handle and log clashes between CNAMES and + DNS names being given to DHCP leases. This fixes a bug + which caused nonsense IP addresses to be logged. Thanks to + Sergei Zhirikov for finding and analysing the problem. + + Tweak flush_log so as to avoid leaving the log + file in non-blocking mode. O_NONBLOCK is a property of the + file, not the process/descriptor. + + Fix contrib/Solaris10/create_package + (/usr/man -> /usr/share/man) Thanks to Vita Batrla. + + Fix a problem where, if a client got a lease, then went + to another subnet and got another lease, then moved back, + it couldn't resume the old lease, but would instead get + a new address. Thanks to Leonardo Rodrigues for spotting + this and testing the fix. + + Fix weird bug which sometimes omitted certain characters + from the start of quoted strings in dhcp-options. Thanks + to Dayton Turner for spotting the problem. + + Add facility to redirect some domains to the standard + upstream servers: this allows something like + --server=/google.com/1.2.3.4 --server=/www.google.com/# + which will send queries for *.google.com to 1.2.3.4, + except *www.google.com which will be forwarded as usual. + Thanks to AJ Weber for prompting this addition. + + Improve the hash-algorithm used to generate IP addresses + from MAC addresses during initial DHCP address + allocation. This improves performance when large numbers + of hosts with similar MAC addresses all try and get an IP + address at the same time. Thanks to Paul Smith for his + work on this. + + Tweak DHCP code so that --bridge-interface can be used to + select which IP alias of an interface should be used for + DHCP purposes on Linux. If eth0 has an alias eth0:dhcp + then adding --bridge-interface=eth0:dhcp,eth0 will use + the address of eth0:dhcp to determine the correct subnet + for DHCP address allocation. Thanks to Pawel Golaszewski + for prompting this and Eric Cooper for further testing. + + Add --dhcp-generate-names. Suggestion by Ferenc Wagner. + + Tweak DNS server selection algorithm when there is more + than one server available for a domain, eg. + --server=/mydomain/1.1.1.1 + --server=/mydomain/2.2.2.2 + Thanks to Alberto Cuesta-Canada for spotting a weakness + here. + + Add --max-ttl. Thanks to Fredrik Ringertz for the patch. + + Allow --log-facility=- to force all logging to + stderr. Suggestion from Clemens Fischer. + + Fix regression which caused configuration like + --address=/.domain.com/1.2.3.4 to be rejected. The dot to the + left of the domain has been implied and not required for a + long time, but it should be accepted for backward + compatibility. Thanks to Andrew Burcin for spotting this. + + Add --rebind-domain-ok and --rebind-localhost-ok. + Suggestion from Clemens Fischer. + + Log replies to queries of type TXT, when --log-queries + is set. + + Fix compiler warnings when compiled with -DNO_DHCP. Thanks + to Shantanu Gadgil for the patch. + + Updated French translation. Thanks to Gildas Le Nadan. + + Updated Polish translation. Thanks to Jan Psota. + + Updated German translation. Thanks to Matthias Andree. + + Added contrib/static-arp, thanks to Darren Hoo. + + Fix corruption of the domain when a name from /etc/hosts + overrides one supplied by a DHCP client. Thanks to Fedor + Kozhevnikov for spotting the problem. + + Updated Spanish translation. Thanks to Chris Chatham. + + version 2.52 Work around a Linux kernel bug which insists that the length of the option passed to setsockopt must be at least @@ -81,7 +257,7 @@ version 2.52 reconfigured using --edns-packet-max if needed. Thanks to Francis Dupont for pointing this out. - Rewrite query-ids even for DNSSEC signed packets, since + Rewrite query-ids even for TSIG signed packets, since this is allowed by RFC5625 section 4.5. Use getopt_long by default on OS X. It has been supported @@ -101,7 +277,12 @@ version 2.52 Updated Spanish translation. Thanks to Chris Chatham. + Fixed confusion about domains, when looking up DHCP hosts + in /etc/hosts. This could cause spurious "Ignoring + domain..." messages. Thanks to Fedor Kozhevnikov for + finding and analysing the problem. + version 2.51 Add support for internationalised DNS. Non-ASCII characters in domain names found in /etc/hosts, /etc/ethers and diff --git a/release/src/router/dnsmasq/FAQ b/release/src/router/dnsmasq/FAQ index b51c31e0f8..d7df80c4fb 100644 --- a/release/src/router/dnsmasq/FAQ +++ b/release/src/router/dnsmasq/FAQ @@ -456,6 +456,16 @@ A: In almost all cases: none. If you have the normal arrangement with and turn on syslog-ng's dns-cache function. +Q: DHCP doesn't work with windows Vista, but everything else is fine. + +A: The DHCP client on windows Vista (and possibly later versions) + demands that the DHCP server send replies as broadcasts. Most other + clients don't do this. The broadcasts are send to + 255.255.255.255. A badly configured firewall which blocks such + packets will show exactly these symptoms (Vista fails, others + work). + + diff --git a/release/src/router/dnsmasq/contrib/Solaris10/README-sparc b/release/src/router/dnsmasq/contrib/Solaris10/README-sparc new file mode 100644 index 0000000000..327b65ca80 --- /dev/null +++ b/release/src/router/dnsmasq/contrib/Solaris10/README-sparc @@ -0,0 +1,8 @@ +Hi Simon, + +I just wanted to let you know that I have built a Solaris .pkg install package of your dnsmasq utility for people to use. Feel free to point them in my direction if you have people who want this sort of thing. + +http://ejesconsulting.wordpress.com/2010/05/12/gnu-dnsmasq-for-opensolaris-sparc/ + +Thanks +-evan diff --git a/release/src/router/dnsmasq/contrib/Solaris10/create_package b/release/src/router/dnsmasq/contrib/Solaris10/create_package index fd3fc84c2b..acfa2a1c06 100644 --- a/release/src/router/dnsmasq/contrib/Solaris10/create_package +++ b/release/src/router/dnsmasq/contrib/Solaris10/create_package @@ -6,7 +6,7 @@ # BIN_DIR="/usr/sbin" CONF_DIR="/etc" -MAN_DIR="/usr/man/man8" +MAN_DIR="/usr/share/man/man8" PACKAGE_NAME="dnsmasq" diff --git a/release/src/router/dnsmasq/contrib/static-arp/static-arp b/release/src/router/dnsmasq/contrib/static-arp/static-arp new file mode 100644 index 0000000000..82115b762e --- /dev/null +++ b/release/src/router/dnsmasq/contrib/static-arp/static-arp @@ -0,0 +1,35 @@ +#!/bin/sh + +# Contributed by Darren Hoo + +# If you use dnsmasq as DHCP server on a router, you may have +# met with attackers trying ARP Poison Routing (APR) on your +# local area network. This script will setup a 'permanent' entry +# in the router's ARP table upon each DHCP transaction so as to +# make the attacker's efforts less successful. + +# Usage: +# edit /etc/dnsmasq.conf and specify the path of this script +# to dhcp-script, for example: +# dhcp-script=/usr/sbin/static-arp + +# if $1 is add or old, update the static arp table entry. +# if $1 is del, then delete the entry from the table +# if $1 is init which is called by dnsmasq at startup, it's ignored + +ARP=/usr/sbin/arp + +# Arguments. +# $1 is action (add, del, old) +# $2 is MAC +# $3 is address +# $4 is hostname (optional, may be unset) + +if [ ${1} = del ] ; then + ${ARP} -d $3 +fi + +if [ ${1} = old ] || [ ${1} = add ] ; then + ${ARP} -s $3 $2 +fi + diff --git a/release/src/router/dnsmasq/dnsmasq.conf.example b/release/src/router/dnsmasq/dnsmasq.conf.example index 954056009b..fd634bc3ed 100644 --- a/release/src/router/dnsmasq/dnsmasq.conf.example +++ b/release/src/router/dnsmasq/dnsmasq.conf.example @@ -66,12 +66,12 @@ # You can control how dnsmasq talks to a server: this forces # queries to 10.1.2.3 to be routed via eth1 -# --server=10.1.2.3@eth1 +# server=10.1.2.3@eth1 # and this sets the source (ie local) address used to talk to # 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that # IP on the machine, obviously). -# --server=10.1.2.3@192.168.1.1#55 +# server=10.1.2.3@192.168.1.1#55 # If you want dnsmasq to change uid and gid to something other # than the default, edit the following lines. @@ -141,10 +141,22 @@ # don't need to worry about this. #dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -# This is an example of a DHCP range with a network-id, so that +# This is an example of a DHCP range which sets a tag, so that # some DHCP options may be set only for this network. -#dhcp-range=red,192.168.0.50,192.168.0.150 - +#dhcp-range=set:red,192.168.0.50,192.168.0.150 + +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h + +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explict netmask instead. +#dhcp-range=192.168.0.0,static + # 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 @@ -200,29 +212,29 @@ # Send extra options which are tagged as "red" to # the machine with ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,net:red +#dhcp-host=11:22:33:44:55:66,set:red # Send extra options which are tagged as "red" to # any machine with ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,net:red +#dhcp-host=11:22:33:*:*:*,set:red # Ignore any clients which are specified in dhcp-host lines # or /etc/ethers. Equivalent to ISC "deny unkown-clients". # This relies on the special "known" tag which is set when # a host is matched. -#dhcp-ignore=#known +#dhcp-ignore=tag:!known # Send extra options which are tagged as "red" to any machine whose # DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=red,Linux +#dhcp-vendorclass=set:red,Linux # Send extra options which are tagged as "red" to any machine one # of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=red,accounts +#dhcp-userclass=set:red,accounts # Send extra options which are tagged as "red" to any machine whose # MAC address matches the pattern. -#dhcp-mac=red,00:60:8C:*:*:* +#dhcp-mac=set:red,00:60:8C:*:*:* # If this line is uncommented, dnsmasq will read /etc/ethers and act # on the ethernet-address/IP pairs found there just as if they had @@ -276,8 +288,8 @@ # Specify an option which will only be sent to the "red" network # (see dhcp-range for the declaration of the "red" network) -# Note that the net: part must precede the option: part. -#dhcp-option = net:red, option:ntp-server, 192.168.1.1 +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 # The following DHCP options set up dnsmasq in the same way as is specified # for the ISC dhcpcd in @@ -338,8 +350,8 @@ # Boot for Etherboot gPXE. The idea is to send two different # filenames, the first loads gPXE, and the second tells gPXE what to # load. The dhcp-match sets the gpxe tag for requests from gPXE. -#dhcp-match=gpxe,175 # gPXE sends a 175 option. -#dhcp-boot=net:#gpxe,undionly.kpxe +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe #dhcp-boot=mybootimage # Encapsulated options for Etherboot gPXE. All the options are @@ -490,11 +502,11 @@ # set for this to work.) # A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 +# ldapserver.example.com port 389 #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 # A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 (using domain=) +# ldapserver.example.com port 389 (using domain=) #domain=example.com #srv-host=_ldap._tcp,ldapserver.example.com,389 diff --git a/release/src/router/dnsmasq/man/dnsmasq.8 b/release/src/router/dnsmasq/man/dnsmasq.8 index 6ed8a0dd53..80d0120376 100644 --- a/release/src/router/dnsmasq/man/dnsmasq.8 +++ b/release/src/router/dnsmasq/man/dnsmasq.8 @@ -65,6 +65,12 @@ cache the reply. This option gives a default value for time-to-live (in seconds) which dnsmasq uses to cache negative replies even in the absence of an SOA record. .TP +.B --max-ttl=