import of dnsmasq-2.35.tar.gz

This commit is contained in:
Simon Kelley
2006-10-28 16:26:19 +01:00
parent 1697269ce7
commit 4011c4e05e
20 changed files with 556 additions and 505 deletions

View File

@@ -2009,6 +2009,32 @@ version 2.34
Added Webmin module in contrib/webmin. Thanks to Neil
Fisher for that.
version 2.35
Generate an "old" script event when a client does a DHCPREQUEST
in INIT-REBOOT or SELECTING state and the lease already
exists. Supply vendor and user class information to these
script calls.
Added support for Dragonfly BSD to src/config.h
Removed "Upgrading to 2.0" document, which is ancient
history now.
Tweak DHCP networking code for BSD, esp OpenBSD. Added a
workaround for a bug in OpenBSD 4.0: there should finally
be support for multiple interfaces under OpenBSD now.
Note that no version of dnsmasq before 2.35 will work for
DHCP under OpenBSD 4.0 because of a kernel bug.
Thanks to Claudio Jeker, Jeb Campbell and Cristobal
Palmer for help with this.
Optimised the cache code for the case of large
/etc/hosts. This is mainly to remove the O(n-squared)
algorithm which made reading large (50000 lines) files
slow, but it also takes into account the size of
/etc/hosts when building hash tables, so overall
performance should be better. Thanks to "koko" for
pointing out the problem.

View File

@@ -1,68 +0,0 @@
Upgrading to dnsmasq V2
-----------------------
Version 1.x of dnsmasq includes a facility for reading the dhcp.leases
file written by ISC dhcpd. This allows the names of machines which
have addresses allocated by DHCP to be included in the DNS.
Version 2.x of dnsmasq replaces the ISC dhcpd integration with a DHCP
server integrated into dnsmasq. Versions 2.0-2.5 removed the ISC
integration completely, but in version 2.6 it was re-enabled for
backwards compatibility purposes. The change to an integrated DHCP
server has the following advantages:
* Small. ISC dhcpd is a large and comprehensive DHCP solution. The
dnsmasq DHCP server adds about 15k to DNS-only dnsmasq and provides
all the facilities likely to be needed in the sort of networks
which are targeted by dnsmasq.
* Easy to configure. All configuration is in one file and there are
sensible defaults for common settings. Many applications will need
just one extra line in /etc/dnsmasq.conf which tells it the range of
addresses to allocate to DHCP.
* Support for static leases. When static leases are used with ISC DHCP
they don't appear in the dhcp.leases file (since that file is used
for storage of dynamic leases which aren't pre-configured.) Hence
static leases cannot be used with dnsmasq unless each machine with a
static lease is also inserted into /etc/hosts. This is not required
with the dnsmasq DHCP server.
DHCP configuration
------------------
To convert an installation which is currently using ISC dhcpd, remove
the ISC DHCP daemon. Unless you want dnsmasq to use the same file
to store its leases it is necessary to remove the configuration line in
/etc/dnsmasq.conf which specifies the dhcp.leases file.
To enable DHCP, simply add a line like this to /etc/dnsmasq.conf
dhcp-range=192.168.0.100,192.168.0.200,12h
which tells dnsmasq to us the addresses 192.168.0.100 to 192.168.0.200
for dynamic IP addresses, and to issue twelve hour leases.
Each host will have its default route and DNS server set to be the
address of the host running dnsmasq, and its netmask and broadcast
address set correctly, so nothing else at all is required for a
minimal system. Hosts which include a hostname in their DHCP request
will have that name and their allocated address inserted into the DNS,
in the same way as before.
Having started dnsmasq, tell any hosts on the network to renew their
DHCP lease, so that dnsmasq's DHCP server becomes aware of them. For
Linux, this is best done by killing-and-restarting the DHCP client
daemon or taking the network interface down and then back up. For
Windows 9x/Me, use the graphical tool "winipcfg". For Windows
NT/2000/XP, use the command-line "ipconfig /renew"
For more complex DHCP configuration, refer to the doc/setup.html, the
dnsmasq manpage and the annotated example configuration file. Also
note that for some ISC dhcpd to dnsmasq DHCP upgrades there may be
firewall issues: see the FAQ for details of this.

View File

@@ -21,11 +21,11 @@ resource use and ease of configuration are important.
Supported platforms include Linux (with glibc and uclibc), *BSD and
Mac OS X.
Dnsmasq is included in at least the following Linux distributions:
Gentoo, Debian, Slackware, Suse,
Gentoo, Debian, Slackware, Suse, Fedora,
Smoothwall, IP-Cop, floppyfw, Firebox, LEAF, Freesco, fli4l,
CoyoteLinux, Endian Firewall and
Clarkconnect. It is also available as a FreeBSD port and is used in
Linksys wireless routers and the m0n0wall project.
Clarkconnect. It is also available as FreeBSD, OpenBSD and NetBSD ports and is used in
Linksys wireless routers (dd-wrt, openwrt and the stock firmware) and the m0n0wall project.
<P>
Dnsmasq provides the following features:
<DIR>
@@ -74,7 +74,7 @@ upstream servers handling only those domains. This makes integration
with private DNS systems easy.
</LI>
<LI>
Dnsmasq supports MX records and can be configured to return MX records
Dnsmasq supports MX and SRV records and can be configured to return MX records
for any or all local machines.
</LI>
</DIR>
@@ -82,27 +82,11 @@ for any or all local machines.
<H2>Download.</H2>
<A HREF="http://www.thekelleys.org.uk/dnsmasq/"> Download</A> dnsmasq here.
The tarball includes this documentation, source, manpage and control files for building .rpms.
There are also pre-built i386 .rpms, and a
<A HREF="CHANGELOG"> CHANGELOG</A>.
The tarball includes this documentation, source, and manpage.
There is also a <A HREF="CHANGELOG"> CHANGELOG</A>.
Dnsmasq is part of the Debian distribution, it can be downloaded from
<A HREF="http://ftp.debian.org/debian/pool/main/d/dnsmasq/"> here</A> or installed using <TT>apt</TT>.
<H2>Building rpms.</H2>
Assuming you have the relevant tools installed, you can rebuild .rpms simply by running (as root)
<PRE>
rpmbuild -ta dnsmasq-xxx.tar.gz
</PRE>
Note for Suse users: you will need to re-compress the tar file as
bzip2 before building using the commands
<PRE>
gunzip dnsmasq-xxx.tar.gz
bzip2 dnsmasq-zzz.tar
</PRE>
<H2>Links.</H2>
There is an article in German on dnsmasq at <A
HREF="http://www.linuxnetmag.com/de/issue7/m7dnsmasq1.html">http://www.linuxnetmag.com/de/issue7/m7dnsmasq1.html</A>

2
hosts Normal file
View File

@@ -0,0 +1,2 @@
127.0.0.1 host1.domain

View File

@@ -354,7 +354,7 @@ always optional. On some broken systems, dnsmasq can listen on only
one interface when using DHCP, and the name of that interface must be
given using the
.B interface
option. This limitation currently affects OpenBSD. It is always
option. This limitation currently affects OpenBSD before version 4.0. It is always
allowed to have more than one dhcp-range in a single subnet. The optional
network-id is a alphanumeric label which marks this network so that
dhcp options may be specified on a per-network basis.
@@ -568,8 +568,9 @@ The environment is inherited from the invoker of dnsmasq, and if the
host provided a client-id, this is stored in the environment variable
DNSMASQ_CLIENT_ID. If the client provides vendor-class or user-class
information, these are provided in DNSMASQ_VENDOR_CLASS and
DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn variables, but only for the
"add" actions, since these data are not held in dnsmasq's lease
DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn variables, but only fory
"add" actions or "old" actions when a host resumes an existing lease,
since these data are not held in dnsmasq's lease
database. If dnsmasq was compiled with HAVE_BROKEN_RTC, then
the length of the lease (in seconds) is stored in
DNSMASQ_LEASE_LENGTH, otherwise the time of lease expiry is stored in

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-09-27 09:37+0100\n"
"Last-Translator: Simon Kelley <simon@thekelleys.org.uk>\n"
"Language-Team: German <de@li.org>\n"
@@ -15,37 +15,37 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr ""
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr ""
# @Simon: Here I need an example to understand it :)
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr ""
# @Simon: Here I need an example to understand it :)
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "lese %s - %d Adressen"
# @Simon: 'lese' is present, is that ok? If it should be past, it would be
# @Simon: "gelesen: %s - %d Adressen" - note the colon, it's a must, then.
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "Cache geleert"
# @Simon: "Cache geleert" is literally "Cache emptied" but I think other translations could be misleading
# @Simon: (I don't know a good german replacement for "Cache" but AFAIK "Cache" is common in german)
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -56,7 +56,7 @@ msgstr ""
# @Simon: "Mieter" is rather 'logder, renter, tenant, lessee' but I couldn't find anything that fits better.
# @Simon: So I thought I put it in ''-marks :)
#: cache.c:808
#: cache.c:887
#, fuzzy, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -796,47 +796,47 @@ msgstr ""
msgid "failed to set options on DHCP socket: %s"
msgstr ""
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
msgstr ""
#: dhcp.c:59
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr ""
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr ""
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr ""
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr ""
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr ""
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr ""
#: dhcp.c:669
#: dhcp.c:688
#, c-format
msgid "bad line at %s line %d"
msgstr ""
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr ""
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -882,7 +882,7 @@ msgstr ""
msgid "disabled"
msgstr ""
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr ""
@@ -894,11 +894,11 @@ msgstr ""
msgid "no address available"
msgstr ""
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr ""
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr ""
@@ -911,7 +911,7 @@ msgstr ""
msgid "unknown lease"
msgstr ""
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr ""
@@ -931,36 +931,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr ""
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr ""
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr ""
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr ""
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr ""
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr ""

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-10-07 11:04+0100\n"
"Last-Translator: Christopher Chatham <chrislinux@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n"
@@ -15,31 +15,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr "no se pudo cargar nombres desde %s: %m"
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, fuzzy, c-format
msgid "bad address at %s line %d"
msgstr "nombre err<72>neo en %s l<>nea %d"
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr "nombre err<72>neo en %s l<>nea %d"
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "direcci<63>nes %s - %d le<6C>das"
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "el cach<63> fue liberado"
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -48,7 +48,7 @@ msgstr ""
"no otorgando nombre %s al arriendo DHCP de %s porque el nombre existe en %s "
"con direcci<63>n %s"
#: cache.c:808
#: cache.c:887
#, fuzzy, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -773,47 +773,47 @@ msgstr "no se puede crear socket DHCP: %s"
msgid "failed to set options on DHCP socket: %s"
msgstr "no se pudo fijar opciones en socket DHCP: %s"
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
#: dhcp.c:59
#, fuzzy, c-format
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr "no se pudo fijar SO_REUSEADDR en socket DHCP: %s"
#: dhcp.c:59
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr "no se pudo acoplar socket de servidor DHCP: %s"
#: dhcp.c:72
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr "no se puede crear socket crudo ICMP: %s."
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr "direcci<63>n IP duplicada en directiva dhcp-config."
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr "rango DHCP %s -- %s no coincide con m<>scara de subred %s"
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr "no se pudo leer %s:%m"
#: dhcp.c:669
#: dhcp.c:688
#, fuzzy, c-format
msgid "bad line at %s line %d"
msgstr "nombre err<72>neo en %s l<>nea %d"
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr "direcci<63>n IP duplicada %s (%s) en directiva dhcp-config"
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -860,7 +860,7 @@ msgstr "v
msgid "disabled"
msgstr "deshabilitado"
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr "direcci<63>n en uso"
@@ -872,11 +872,11 @@ msgstr "ninguna direcci
msgid "no address available"
msgstr "ninguna direcci<63>n disponible"
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr "no queda ning<6E>n arriendo"
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr "red equivocada"
@@ -889,7 +889,7 @@ msgstr "deshabilitando direcci
msgid "unknown lease"
msgstr "arriendo desconocido"
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr "ignorado"
@@ -910,36 +910,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr "no usando direcci<63>n configurada %s porque esta arriendada a %s"
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr "direcci<63>n equivocada"
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr "arriendo no encontrado"
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr "direcci<63>n no disponible"
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr "arriendo est<73>tico disponible"
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr "direcci<63>n reservada"
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr "ning<6E>n unique-id (ID <20>nico)"
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr "no se puede enviar opci<63>n DHCP %d: no queda espacio en el paquete"
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr "M<>s de una clase de vendedor coincide, usando %s"

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-11-28 22:05+0000\n"
"Last-Translator: Simon Kelley <simon@thekelleys.org.uk>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
@@ -15,38 +15,38 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr ""
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr ""
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr ""
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr ""
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr ""
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
"with address %s"
msgstr ""
#: cache.c:808
#: cache.c:887
#, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -747,47 +747,47 @@ msgstr ""
msgid "failed to set options on DHCP socket: %s"
msgstr ""
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
msgstr ""
#: dhcp.c:59
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr ""
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr ""
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr ""
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr ""
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr ""
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr ""
#: dhcp.c:669
#: dhcp.c:688
#, c-format
msgid "bad line at %s line %d"
msgstr ""
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr ""
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -833,7 +833,7 @@ msgstr ""
msgid "disabled"
msgstr ""
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr ""
@@ -845,11 +845,11 @@ msgstr ""
msgid "no address available"
msgstr ""
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr ""
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr ""
@@ -862,7 +862,7 @@ msgstr ""
msgid "unknown lease"
msgstr ""
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr ""
@@ -882,36 +882,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr ""
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr ""
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr ""
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr ""
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr ""
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr ""

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.34\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-10-02 19:05+0100\n"
"Last-Translator: Lionel Tricon <lionel.tricon@free.fr>\n"
"Language-Team: French <traduc@traduc.org>\n"
@@ -16,31 +16,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr "Impossible de charger les noms <20> partir de %s : %m"
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr "mauvaise adresse dans %s ligne %d"
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr "mauvais nom dans %s ligne %d"
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "lecture %s - %d adresses"
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "cache vid<69>"
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -49,7 +49,7 @@ msgstr ""
"ne donne pas de nom %s au bail DHCP de %s parce-que le nom existe dans %s "
"avec l'adresse %s"
#: cache.c:808
#: cache.c:887
#, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -793,49 +793,49 @@ msgstr "ne peut cr
msgid "failed to set options on DHCP socket: %s"
msgstr "impossible d'appliquer les options sur la socket DHCP : %s"
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
#: dhcp.c:59
#, fuzzy, c-format
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr "impossible de d<>clarer SO_REUSEADDR sur la socket DHCP : %s"
#: dhcp.c:59
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr "impossible de lier la socket serveur DHCP : %s"
#: dhcp.c:72
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr "ne peut cr<63>er de socket en mode raw pour ICMP : %s."
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr "adresse IP %s dupliqu<71>e dans la directive dhcp-config."
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr ""
"La plage d'adresses DHCP %s -- %s n'est pas coh<6F>rente avec le masque de "
"r<>seau %s"
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr "impossible de lire %s : %m"
#: dhcp.c:669
#: dhcp.c:688
#, fuzzy, c-format
msgid "bad line at %s line %d"
msgstr "mauvais nom dans %s ligne %d"
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr "adresse IP %s (%s) dupliqu<71>e dans la directive dhcp-config."
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -883,7 +883,7 @@ msgstr "par l'interm
msgid "disabled"
msgstr "d<>sactiv<69>"
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr "adresse d<>j<EFBFBD> utilis<69>e"
@@ -895,11 +895,11 @@ msgstr "pas d'adresse configur
msgid "no address available"
msgstr "pas d'adresse disponible"
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr "plus aucun bail disponible"
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr "mauvais r<>seau"
@@ -912,7 +912,7 @@ msgstr "d
msgid "unknown lease"
msgstr "bail inconnu"
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr "ignor<6F>"
@@ -937,37 +937,37 @@ msgstr ""
"L'adresse statique %s ne sera pas utilis<69>e car elle a pr<70>alablement <20>t<EFBFBD> "
"refus<75>e"
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr "mauvaise adresse"
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr "bail non trouv<75>"
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr "adresse non disponible"
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr "bail statique disponible"
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr "adresse reserv<72>e"
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr "pas d'identifiant unique"
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
"Impossible d'envoyer l'option DHCP %d : pas assez d'espace dans le paquet"
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr "Plusieurs classes de fournisseurs correspondent, %s sera utilis<69>"

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-10-07 11:45+0100\n"
"Last-Translator: Salman AS <sas@salman.or.id>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
@@ -15,36 +15,36 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
# OK
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr "gagal memuat nama-nama dari %s: %m"
# OK
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, fuzzy, c-format
msgid "bad address at %s line %d"
msgstr "kesalahan nama pada %s baris %d"
# OK
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr "kesalahan nama pada %s baris %d"
# OK
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "membaca %s - %d alamat"
# OK
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "cache telah dihapus"
# OK
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -54,7 +54,7 @@ msgstr ""
"sdengan alamat %s"
# OK
#: cache.c:808
#: cache.c:887
#, fuzzy, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -915,55 +915,55 @@ msgid "failed to set options on DHCP socket: %s"
msgstr "gagal menyetel opsi pada socket DHCP: %s"
# OK
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
#: dhcp.c:59
#, fuzzy, c-format
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr "gagal menyetel SO_REUSEADDR pada socket DHCP: %s"
# OK
#: dhcp.c:59
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr "gagal mem-bind socket server DHCP: %s"
# OK
#: dhcp.c:72
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr "tidak dapat membuat socket ICMP raw: %s"
# OK
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr "alamat IP kembar %s dalam direktif dhcp-config"
# OK
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr "jangkauan DHCP %s -- %s tidak konsisten dengan netmask %s"
# OK
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr "gagal membaca %s:%m"
# OK
#: dhcp.c:669
#: dhcp.c:688
#, fuzzy, c-format
msgid "bad line at %s line %d"
msgstr "kesalahan nama pada %s baris %d"
# OK
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr "alamat IP kembar %s (%s) dalam direktif dhcp-config"
# OK
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -1019,7 +1019,7 @@ msgid "disabled"
msgstr "di disable"
# OK
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr "alamat telah digunakan"
@@ -1034,12 +1034,12 @@ msgid "no address available"
msgstr "tak ada alamat yang tersedia"
# OK
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr "tak ada lease yang tersisa"
# OK
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr "jaringan yang salah"
@@ -1055,7 +1055,7 @@ msgid "unknown lease"
msgstr "lease tidak diketahui"
# OK
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr "diabaikan"
@@ -1076,41 +1076,41 @@ msgid "not using configured address %s because it was previously declined"
msgstr ""
# OK
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr "alamat salah"
# OK
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr "lease tak ditemukan"
# OK
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr "alamat tak tersedia"
# OK
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr "lease statik tak tersedia"
# OK
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr "alamat telah dipesan"
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
# OK
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr "Lebih dari satu kelas vendor yang sesuai, menggunakan %s"

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.32\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2006-05-22 11:09+0100\n"
"Last-Translator: Simon Kelley <simon@thekelleys.org.uk>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
@@ -15,38 +15,38 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr ""
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr ""
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr ""
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr ""
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr ""
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
"with address %s"
msgstr ""
#: cache.c:808
#: cache.c:887
#, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -747,47 +747,47 @@ msgstr ""
msgid "failed to set options on DHCP socket: %s"
msgstr ""
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
msgstr ""
#: dhcp.c:59
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr ""
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr ""
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr ""
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr ""
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr ""
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr ""
#: dhcp.c:669
#: dhcp.c:688
#, c-format
msgid "bad line at %s line %d"
msgstr ""
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr ""
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -833,7 +833,7 @@ msgstr ""
msgid "disabled"
msgstr ""
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr ""
@@ -845,11 +845,11 @@ msgstr ""
msgid "no address available"
msgstr ""
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr ""
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr ""
@@ -862,7 +862,7 @@ msgstr ""
msgid "unknown lease"
msgstr ""
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr ""
@@ -882,36 +882,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr ""
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr ""
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr ""
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr ""
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr ""
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr ""

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.25\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2006-01-11 17:39+0000\n"
"Last-Translator: Jan Erik Askildt <jeaskildt@gmail.com>\n"
"Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n"
@@ -17,31 +17,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr "feilet <20> laste navn fra %s: %m"
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr "d<>rlig adresse ved %s linje %d"
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr "d<>rlig navn ved %s linje %d"
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "les %s - %d adresser"
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "mellomlager t<>mt"
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -50,7 +50,7 @@ msgstr ""
"gir ikke navnet %s til DHCP leien for %s fordi navnet eksisterer i %s med "
"adressen %s"
#: cache.c:808
#: cache.c:887
#, fuzzy, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -760,47 +760,47 @@ msgstr "kan ikke lage DHCP socket : %s"
msgid "failed to set options on DHCP socket: %s"
msgstr "feilet <20> sette opsjoner p<> DHCP socket: %s"
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
#: dhcp.c:59
#, fuzzy, c-format
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr "feilet <20> sette SO_REUSEADDR p<> DHCP socket: %s"
#: dhcp.c:59
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr "feilet <20> binde DHCP tjener socket: %s"
#: dhcp.c:72
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr "kan ikke lage ICMP raw socket: %s"
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr "dubliserte IP adresser i %s dhcp-config direktiv."
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr "DHCP omr<6D>de %s -- %s er ikke konsistent med nettmaske %s"
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr "feilet <20> lese %s:%m"
#: dhcp.c:669
#: dhcp.c:688
#, c-format
msgid "bad line at %s line %d"
msgstr "d<>rlig linje ved %s linje %d"
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr "dubliserte IP adresser i %s (%s) i dhcp-config direktiv"
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr "Ignorerer DHCP verts navn %s p<> grunn av ulovlig domene del"
@@ -846,7 +846,7 @@ msgstr "via"
msgid "disabled"
msgstr "deaktivert"
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr "adresse i bruk"
@@ -858,11 +858,11 @@ msgstr "ingen adresse konfigurert"
msgid "no address available"
msgstr "ingen adresse tilgjengelig"
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr "ingen leier igjen"
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr "galt nettverk"
@@ -875,7 +875,7 @@ msgstr "deaktiverer DHCP statisk adresse %s"
msgid "unknown lease"
msgstr "ukjent leie"
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr "oversett"
@@ -895,36 +895,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr "gal adresse"
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr "leie ikke funnet"
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr "adresse ikke tilgjengelig"
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr "statisk leie tilgjengelig"
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr "adresse reservert"
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr "kan ikke sende DHCP opsjon %d: ikke mer plass i pakken"
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr "Mer enn en produsent klasse som passer, bruker %s"

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-10-04 19:17+0100\n"
"Last-Translator: Tomasz Socha<68>ski <nerdhero@gmail.com>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -16,31 +16,31 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr "b<><62>d <20>adowania nazw z %s: %m"
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, fuzzy, c-format
msgid "bad address at %s line %d"
msgstr "b<><62>dna nazwa w %s, linia %d"
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr "b<><62>dna nazwa w %s, linia %d"
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "przeczytano %s - %d adres<65>w"
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "wyczyszczono cache"
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -49,7 +49,7 @@ msgstr ""
"nazwa %s nie zosta<74>a nadana dzier<65>awie DHCP %s, poniewa<77> nazwa istnieje w %s "
"i ma adres %s"
#: cache.c:808
#: cache.c:887
#, fuzzy, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -772,47 +772,47 @@ msgstr "nie mo
msgid "failed to set options on DHCP socket: %s"
msgstr "b<><62>d ustawienia opcji gniazda DHCP: %s"
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
#: dhcp.c:59
#, fuzzy, c-format
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr "b<><62>d ustawienia SO_REUSEADDR gniazda DHCP: %s"
#: dhcp.c:59
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr "b<><62>d pod<6F><64>czenia gniazda serwera DHCP: %s"
#: dhcp.c:72
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr "b<><62>d utworzenia surowego gniazda ICMP: %s."
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr "powt<77>rzenie adresu IP %s w opcji dhcp-config"
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr "zakres DHCP %s -- %s jest niesp<73>jny z mask<73> sieciow<6F> %s"
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr "b<><62>d odczytu %s:%m"
#: dhcp.c:669
#: dhcp.c:688
#, fuzzy, c-format
msgid "bad line at %s line %d"
msgstr "b<><62>dna nazwa w %s, linia %d"
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr "powt<77>rzenie adresu IP %s (%s) w opcji dhcp-config"
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -859,7 +859,7 @@ msgstr "przez"
msgid "disabled"
msgstr "wy<77><79>czony(a)"
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr "adres w u<>yciu"
@@ -871,11 +871,11 @@ msgstr "brak skonfigurowanego adresu"
msgid "no address available"
msgstr "brak dost<73>pnego adresu"
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr "brak wolnych dzier<65>aw"
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr "nieprawid<69>owa sie<69>"
@@ -888,7 +888,7 @@ msgstr "wy
msgid "unknown lease"
msgstr "nieznana dzier<65>awa"
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr "ignoruj<75>"
@@ -908,36 +908,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr "b<><62>dny adres"
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr "dzier<65>awa nie znaleziona"
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr "adres niedost<73>pny"
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr "dost<73>pna statyczna dzier<65>awa"
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr "adres zarezerwowany"
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr "Wi<57>cej ni<6E> jeden dystrybutor pasuj<75>cy, u<>ywam %s"

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.26\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2006-01-16 20:42+0000\n"
"Last-Translator: Simon Kelley <simon@thekelleys.org.uk>\n"
"Language-Team: Portuguese <ldp-br@bazar.conectiva.com.br>\n"
@@ -15,38 +15,38 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr ""
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr ""
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr ""
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr ""
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr ""
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
"with address %s"
msgstr ""
#: cache.c:808
#: cache.c:887
#, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -747,47 +747,47 @@ msgstr ""
msgid "failed to set options on DHCP socket: %s"
msgstr ""
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
msgstr ""
#: dhcp.c:59
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr ""
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr ""
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr ""
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr ""
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr ""
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr ""
#: dhcp.c:669
#: dhcp.c:688
#, c-format
msgid "bad line at %s line %d"
msgstr ""
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr ""
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr ""
@@ -833,7 +833,7 @@ msgstr ""
msgid "disabled"
msgstr ""
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr ""
@@ -845,11 +845,11 @@ msgstr ""
msgid "no address available"
msgstr ""
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr ""
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr ""
@@ -862,7 +862,7 @@ msgstr ""
msgid "unknown lease"
msgstr ""
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr ""
@@ -882,36 +882,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr ""
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr ""
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr ""
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr ""
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr ""
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr ""
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr ""

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dnsmasq 2.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-13 18:20+0100\n"
"POT-Creation-Date: 2006-10-28 15:42+0100\n"
"PO-Revision-Date: 2005-11-22 16:46+0000\n"
"Last-Translator: Simon Kelley <simon@thekelleys.org.uk>\n"
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
@@ -15,31 +15,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
# for compatibility purposes the letters â, ă, ş, ţ and î can be written as their look-alike correspondent.
#: cache.c:606
#: cache.c:665
#, c-format
msgid "failed to load names from %s: %m"
msgstr "încărcarea numelor din %s: %m a eşuat"
#: cache.c:642 dhcp.c:682
#: cache.c:699 dhcp.c:701
#, c-format
msgid "bad address at %s line %d"
msgstr "adresă greşită în %s, linia %d"
#: cache.c:669 dhcp.c:696
#: cache.c:745 dhcp.c:715
#, c-format
msgid "bad name at %s line %d"
msgstr "nume greşit în %s linia %d"
#: cache.c:675 dhcp.c:750
#: cache.c:752 dhcp.c:769
#, c-format
msgid "read %s - %d addresses"
msgstr "citesc %s - %d adrese"
#: cache.c:711
#: cache.c:790
msgid "cleared cache"
msgstr "memoria temporară a fost ştearsă"
#: cache.c:764
#: cache.c:843
#, c-format
msgid ""
"not giving name %s to the DHCP lease of %s because the name exists in %s "
@@ -48,7 +48,7 @@ msgstr ""
"nu pot da numele %s împrumutului de adresă DHCP a lui %s deoarece "
"numeleexistă în %s cu adresa %s"
#: cache.c:808
#: cache.c:887
#, fuzzy, c-format
msgid ""
"time %lu, cache size %d, %d/%d cache insertions re-used unexpired cache "
@@ -764,47 +764,47 @@ msgstr "nu pot creea socket DHCP : %s"
msgid "failed to set options on DHCP socket: %s"
msgstr "configurarea opţiunilor socketului DHCP a eşuat: %s"
#: dhcp.c:48
#, c-format
msgid "failed to set SO_REUSEADDR on DHCP socket: %s"
#: dhcp.c:59
#, fuzzy, c-format
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"
msgstr "configurarea SO_REUSEADDR pe socket-ul DHCP a eşuat: %s"
#: dhcp.c:59
#: dhcp.c:72
#, c-format
msgid "failed to bind DHCP server socket: %s"
msgstr "activarea socket-ului server-ului DHCP a eşuat: %s"
#: dhcp.c:72
#: dhcp.c:85
#, c-format
msgid "cannot create ICMP raw socket: %s."
msgstr "nu pot creea socket ICMP raw: %s."
#: dhcp.c:84
#: dhcp.c:97
#, c-format
msgid "duplicate IP address %s in dhcp-config directive."
msgstr "adresă IP duplicat %s în declaraţia dhcp-config."
#: dhcp.c:317
#: dhcp.c:336
#, c-format
msgid "DHCP range %s -- %s is not consistent with netmask %s"
msgstr "domeniu DHCP %s -- %s nu este consistent cu masca de reţea %s"
#: dhcp.c:634
#: dhcp.c:653
#, c-format
msgid "failed to read %s:%m"
msgstr "citirea %s:%n a eşuat"
#: dhcp.c:669
#: dhcp.c:688
#, c-format
msgid "bad line at %s line %d"
msgstr "linie invalidă în %s rândul %d"
#: dhcp.c:776
#: dhcp.c:795
#, c-format
msgid "duplicate IP address %s (%s) in dhcp-config directive"
msgstr "adresă IP duplicat %s (%s) în declaraţia dhcp-config."
#: dhcp.c:812
#: dhcp.c:831
#, c-format
msgid "Ignoring DHCP host name %s because it has an illegal domain part"
msgstr "Ignor numele DHCP al maşinii %s deoarece are domeniu DNS ilegal"
@@ -850,7 +850,7 @@ msgstr "prin"
msgid "disabled"
msgstr "dezactivat"
#: rfc2131.c:324 rfc2131.c:759
#: rfc2131.c:324 rfc2131.c:762
msgid "address in use"
msgstr "adresa este folosită"
@@ -862,11 +862,11 @@ msgstr "adresă lipsă"
msgid "no address available"
msgstr "nici o adresă disponibilă"
#: rfc2131.c:349 rfc2131.c:767
#: rfc2131.c:349 rfc2131.c:772
msgid "no leases left"
msgstr "nu mai am de unde să împrumut"
#: rfc2131.c:352 rfc2131.c:733
#: rfc2131.c:352 rfc2131.c:736
msgid "wrong network"
msgstr "reţea greşită"
@@ -879,7 +879,7 @@ msgstr "dezactivăm adresele DHCP statice %s"
msgid "unknown lease"
msgstr "împrumut necunoscut"
#: rfc2131.c:589 rfc2131.c:862
#: rfc2131.c:589 rfc2131.c:873
msgid "ignored"
msgstr "ignorat"
@@ -899,36 +899,36 @@ msgstr ""
msgid "not using configured address %s because it was previously declined"
msgstr ""
#: rfc2131.c:696
#: rfc2131.c:699
msgid "wrong address"
msgstr "adresă greşită"
#: rfc2131.c:709
#: rfc2131.c:712
msgid "lease not found"
msgstr "împrumutul nu a fost găsit"
#: rfc2131.c:741
#: rfc2131.c:744
msgid "address not available"
msgstr "adresă indisponibilă"
#: rfc2131.c:752
#: rfc2131.c:755
msgid "static lease available"
msgstr "împrumut static este disponibil"
#: rfc2131.c:756
#: rfc2131.c:759
msgid "address reserved"
msgstr "adresă rezervată"
#: rfc2131.c:762
#: rfc2131.c:765
msgid "no unique-id"
msgstr ""
#: rfc2131.c:1000
#: rfc2131.c:1011
#, c-format
msgid "cannot send DHCP option %d: no space left in packet"
msgstr "nu pot trimite opţiunea DHCP %d: nu mai este loc în pachet"
#: rfc2131.c:1301
#: rfc2131.c:1312
#, c-format
msgid "More than one vendor class matches, using %s"
msgstr "Se potrivesc mai multe clase de mărci de interfeţe, folosim %s"

View File

@@ -58,6 +58,8 @@ static void cache_free(struct crec *crecp);
static void cache_unlink(struct crec *crecp);
static void cache_link(struct crec *crecp);
static char *record_source(struct hostsfile *add_hosts, int index);
static void rehash(int size);
static void cache_hash(struct crec *crecp);
void cache_init(int size, int logq)
{
@@ -72,6 +74,7 @@ void cache_init(int size, int logq)
cache_head = cache_tail = NULL;
dhcp_inuse = dhcp_spare = NULL;
new_chain = NULL;
hash_table = NULL;
cache_size = size;
big_free = NULL;
bignames_left = size/10;
@@ -91,16 +94,51 @@ void cache_init(int size, int logq)
}
}
/* hash_size is a power of two. */
for (hash_size = 64; hash_size < cache_size/10; hash_size = hash_size << 1);
hash_table = safe_malloc(hash_size*sizeof(struct crec *));
for(i=0; i < hash_size; i++)
hash_table[i] = NULL;
/* create initial hash table*/
rehash(cache_size);
}
/* In most cases, we create the hash table once here by calling this with (hash_table == NULL)
but if the hosts file(s) are big (some people have 50000 ad-block entries), the table
will be much too small, so the hosts reading code calls rehash every 1000 addresses, to
expand the table. */
static void rehash(int size)
{
struct crec **new, **old, *p, *tmp;
int i, new_size, old_size;
/* hash_size is a power of two. */
for (new_size = 64; new_size < size/10; new_size = new_size << 1);
/* must succeed in getting first instance, failure later is non-fatal */
if (!hash_table)
new = safe_malloc(new_size * sizeof(struct crec *));
else if (new_size <= hash_size || !(new = malloc(new_size * sizeof(struct crec *))))
return;
for(i = 0; i < new_size; i++)
new[i] = NULL;
old = hash_table;
old_size = hash_size;
hash_table = new;
hash_size = new_size;
if (old)
{
for (i = 0; i < old_size; i++)
for (p = old[i]; p ; p = tmp)
{
tmp = p->hash_next;
cache_hash(p);
}
free(old);
}
}
static struct crec **hash_bucket(char *name)
{
unsigned int c, val = 017465; /* Barker code - minimum self-correlationin cyclic shift */
unsigned int c, val = 017465; /* Barker code - minimum self-correlation in cyclic shift */
const unsigned char *mix_tab = (const unsigned char*)typestr;
while((c = (unsigned char) *name++))
@@ -108,7 +146,7 @@ static struct crec **hash_bucket(char *name)
/* don't use tolower and friends here - they may be messed up by LOCALE */
if (c >= 'A' && c <= 'Z')
c += 'a' - 'A';
val = ((val << 7) | (val >> (32 - 7))) + (mix_tab[(val + c) & 0x1F] ^ c);
val = ((val << 7) | (val >> (32 - 7))) + (mix_tab[(val + c) & 0x3F] ^ c);
}
/* hash_size is a power of two */
@@ -204,7 +242,7 @@ static int is_expired(time_t now, struct crec *crecp)
if (difftime(now, crecp->ttd) < 0)
return 0;
return 1;
}
@@ -575,19 +613,38 @@ struct crec *cache_find_by_addr(struct crec *crecp, struct all_addr *addr,
}
static void add_hosts_entry(struct crec *cache, struct all_addr *addr, int addrlen,
unsigned short flags, int index)
unsigned short flags, int index, int addr_dup)
{
struct crec *lookup = cache_find_by_name(NULL, cache->name.sname, 0, flags & (F_IPV4 | F_IPV6));
int i;
/* Remove duplicates in hosts files. */
if (lookup && (lookup->flags & F_HOSTS) &&
memcmp(&lookup->addr.addr, addr, addrlen) == 0)
free(cache);
else
{
/* Ensure there is only one address -> name mapping (first one trumps) */
if (cache_find_by_addr(NULL, addr, 0, flags & (F_IPV4 | F_IPV6)))
/* Ensure there is only one address -> name mapping (first one trumps)
We do this by steam here, first we see if the address is the same as
the last one we saw, which eliminates most in the case of an ad-block
file with thousands of entries for the same address.
Then we search and bail at the first matching address that came from
a HOSTS file. Since the first host entry gets reverse, we know
then that it must exist without searching exhaustively for it. */
if (addr_dup)
flags &= ~F_REVERSE;
else
for (i=0; i<hash_size; i++)
for (lookup = hash_table[i]; lookup; lookup = lookup->hash_next)
if ((lookup->flags & F_HOSTS) &&
(lookup->flags & flags & (F_IPV4 | F_IPV6)) &&
memcmp(&lookup->addr.addr, addr, addrlen) == 0)
{
flags &= ~F_REVERSE;
break;
}
cache->flags = flags;
cache->uid = index;
memcpy(&cache->addr.addr, addr, addrlen);
@@ -595,25 +652,25 @@ static void add_hosts_entry(struct crec *cache, struct all_addr *addr, int addrl
}
}
static void read_hostsfile(char *filename, int opts, char *buff, char *domain_suffix, int index)
static int read_hostsfile(char *filename, int opts, char *buff, char *domain_suffix, int index, int cache_size)
{
FILE *f = fopen(filename, "r");
char *line;
int count = 0, lineno = 0;
int addr_count = 0, name_count = cache_size, lineno = 0;
unsigned short flags, saved_flags = 0;
struct all_addr addr, saved_addr;
if (!f)
{
syslog(LOG_ERR, _("failed to load names from %s: %m"), filename);
return;
return 0;
}
while ((line = fgets(buff, MAXDNAME, f)))
{
struct all_addr addr;
char *token = strtok(line, " \t\n\r");
int addrlen;
unsigned short flags;
int addrlen, addr_dup = 0;
lineno++;
if (!token || (*token == '#'))
@@ -643,12 +700,28 @@ static void read_hostsfile(char *filename, int opts, char *buff, char *domain_su
continue;
}
if (saved_flags == flags && memcmp(&addr, &saved_addr, addrlen) == 0)
addr_dup = 1;
else
{
saved_flags = flags;
saved_addr = addr;
}
addr_count++;
/* rehash every 1000 names. */
if ((name_count - cache_size) > 1000)
{
rehash(name_count);
cache_size = name_count;
}
while ((token = strtok(NULL, " \t\n\r")) && (*token != '#'))
{
struct crec *cache;
if (canonicalise(token))
{
count++;
/* If set, add a version of the name with a default domain appended */
if ((opts & OPT_EXPAND) && domain_suffix && !strchr(token, '.') &&
(cache = malloc(sizeof(struct crec) +
@@ -657,12 +730,15 @@ static void read_hostsfile(char *filename, int opts, char *buff, char *domain_su
strcpy(cache->name.sname, token);
strcat(cache->name.sname, ".");
strcat(cache->name.sname, domain_suffix);
add_hosts_entry(cache, &addr, addrlen, flags, index);
add_hosts_entry(cache, &addr, addrlen, flags, index, addr_dup);
addr_dup = 1;
name_count++;
}
if ((cache = malloc(sizeof(struct crec) + strlen(token)+1-SMALLDNAME)))
{
strcpy(cache->name.sname, token);
add_hosts_entry(cache, &addr, addrlen, flags, index);
add_hosts_entry(cache, &addr, addrlen, flags, index, addr_dup);
name_count++;
}
}
else
@@ -671,14 +747,17 @@ static void read_hostsfile(char *filename, int opts, char *buff, char *domain_su
}
fclose(f);
rehash(name_count);
syslog(LOG_INFO, _("read %s - %d addresses"), filename, count);
syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
return name_count;
}
void cache_reload(int opts, char *buff, char *domain_suffix, struct hostsfile *addn_hosts)
{
struct crec *cache, **up, *tmp;
int i;
int i, total_size = cache_size;
cache_inserted = cache_live_freed = 0;
@@ -713,10 +792,10 @@ void cache_reload(int opts, char *buff, char *domain_suffix, struct hostsfile *a
}
if (!(opts & OPT_NO_HOSTS))
read_hostsfile(HOSTSFILE, opts, buff, domain_suffix, 0);
total_size = read_hostsfile(HOSTSFILE, opts, buff, domain_suffix, 0, total_size);
while (addn_hosts)
{
read_hostsfile(addn_hosts->fname, opts, buff, domain_suffix, addn_hosts->index);
total_size = read_hostsfile(addn_hosts->fname, opts, buff, domain_suffix, addn_hosts->index, total_size);
addn_hosts = addn_hosts->next;
}
}

View File

@@ -10,7 +10,7 @@
GNU General Public License for more details.
*/
#define VERSION "2.34"
#define VERSION "2.35"
#define FTABSIZ 150 /* max number of outstanding requests (default) */
#define MAX_PROCS 20 /* max no children for TCP requests */
@@ -33,7 +33,7 @@
# define RESOLVFILE "/etc/resolv.conf"
#endif
#define RUNFILE "/var/run/dnsmasq.pid"
#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"
@@ -216,7 +216,7 @@ typedef unsigned long in_addr_t;
# define HAVE_BROKEN_SOCKADDR_IN6
#endif
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#undef HAVE_LINUX_NETWORK
/* Later verions of FreeBSD have getopt_long() */
#if defined(optional_argument) && defined(required_argument)

View File

@@ -31,7 +31,7 @@ void dhcp_init(struct daemon *daemon)
if (fd == -1)
die (_("cannot create DHCP socket : %s"), NULL);
if (!fix_fd(fd) ||
if (!fix_fd(fd) ||
#if defined(HAVE_LINUX_NETWORK)
setsockopt(fd, SOL_IP, IP_PKTINFO, &oneopt, sizeof(oneopt)) == -1 ||
#elif defined(IP_RECVIF)
@@ -41,11 +41,24 @@ void dhcp_init(struct daemon *daemon)
die(_("failed to set options on DHCP socket: %s"), NULL);
/* When bind-interfaces is set, there might be more than one dnmsasq
instance binding port 67. That's Ok if they serve different networks.
Need to set REUSEADDR to make this posible. */
if ((daemon->options & OPT_NOWILD) &&
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &oneopt, sizeof(oneopt)) == -1)
die(_("failed to set SO_REUSEADDR on DHCP socket: %s"), NULL);
instance binding port 67. That's OK if they serve different networks.
Need to set REUSEADDR to make this posible, or REUSEPORT on *BSD.
OpenBSD <= 4.0 screws up IP_RECVIF when SO_REUSEPORT is set, but
OpenBSD <= 3.9 doesn't have IP_RECVIF anyway, so we just have to elide
this for OpenBSD 4.0, if you want more than one instance on oBSD4.0, tough. */
#ifndef OpenBSD4_0
if (daemon->options & OPT_NOWILD)
{
#ifdef SO_REUSEPORT
int rc = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &oneopt, sizeof(oneopt));
#else
int rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &oneopt, sizeof(oneopt));
#endif
if (rc == -1)
die(_("failed to set SO_REUSE{ADDR|PORT} on DHCP socket: %s"), NULL);
}
#endif
memset(&saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET;
@@ -116,8 +129,8 @@ void dhcp_packet(struct daemon *daemon, time_t now)
#endif
} control_u;
msg.msg_control = control_u.control;
msg.msg_controllen = sizeof(control_u);
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_name = NULL;
msg.msg_namelen = 0;
msg.msg_iov = &daemon->dhcp_packet;
@@ -134,42 +147,48 @@ void dhcp_packet(struct daemon *daemon, time_t now)
/* expand_buf may have moved buffer */
mess = daemon->dhcp_packet.iov_base;
msg.msg_controllen = sizeof(control_u);
msg.msg_control = control_u.control;
msg.msg_flags = 0;
msg.msg_name = &dest;
msg.msg_namelen = sizeof(dest);
while ((sz = recvmsg(daemon->dhcpfd, &msg, 0)) == -1 && errno == EINTR);
if ((msg.msg_flags & MSG_TRUNC) ||
sz < (ssize_t)(sizeof(*mess) - sizeof(mess->options)))
if (sz < (ssize_t)(sizeof(*mess) - sizeof(mess->options)))
return;
#if defined (HAVE_LINUX_NETWORK)
if (msg.msg_controllen < sizeof(struct cmsghdr))
return;
for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
if (cmptr->cmsg_level == SOL_IP && cmptr->cmsg_type == IP_PKTINFO)
{
iface_index = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_ifindex;
if (((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_addr.s_addr != INADDR_BROADCAST)
unicast_dest = 1;
}
if (msg.msg_controllen >= sizeof(struct cmsghdr))
for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
if (cmptr->cmsg_level == SOL_IP && cmptr->cmsg_type == IP_PKTINFO)
{
iface_index = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_ifindex;
if (((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_addr.s_addr != INADDR_BROADCAST)
unicast_dest = 1;
}
if (!(ifr.ifr_ifindex = iface_index) ||
ioctl(daemon->dhcpfd, SIOCGIFNAME, &ifr) == -1)
return;
#elif defined(IP_RECVIF)
if (msg.msg_controllen < sizeof(struct cmsghdr))
return;
for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF)
iface_index = ((struct sockaddr_dl *)CMSG_DATA(cmptr))->sdl_index;
if (msg.msg_controllen >= sizeof(struct cmsghdr))
for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_RECVIF)
iface_index = ((struct sockaddr_dl *)CMSG_DATA(cmptr))->sdl_index;
if (!iface_index || !if_indextoname(iface_index, ifr.ifr_name))
return;
#ifdef MSG_BCAST
/* OpenBSD tells us when a packet was broadcast */
if (!(msg.msg_flags & MSG_BCAST))
unicast_dest = 1;
#endif
#else
/* fallback for systems without IP_RECVIF - allow only one interface
and assume packets arrive from it - yuk. */
{
struct iname *name;
for (name = daemon->if_names; name->isloop; name = name->next);
@@ -179,7 +198,7 @@ void dhcp_packet(struct daemon *daemon, time_t now)
#endif
ifr.ifr_addr.sa_family = AF_INET;
if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) < 0 )
if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) == -1 )
return;
iface_addr = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;

View File

@@ -230,13 +230,10 @@ void queue_script(struct daemon *daemon, int action, struct dhcp_lease *lease, c
if (daemon->helperfd == -1)
return;
if (action == ACTION_ADD)
{
if (lease->vendorclass)
vclass_len = lease->vendorclass_len;
if (lease->userclass)
uclass_len = lease->userclass_len;
}
if (lease->vendorclass)
vclass_len = lease->vendorclass_len;
if (lease->userclass)
uclass_len = lease->userclass_len;
if (lease->clid)
clid_len = lease->clid_len;
if (hostname)

View File

@@ -95,7 +95,7 @@ size_t dhcp_reply(struct daemon *daemon, struct dhcp_context *context, char *ifa
struct dhcp_vendor *vendor;
struct dhcp_mac *mac;
struct dhcp_netid_list *id_list;
int clid_len = 0, ignore = 0;
int clid_len = 0, ignore = 0, do_classes = 0;
struct dhcp_packet *mess = daemon->dhcp_packet.iov_base;
unsigned char *p, *end = (unsigned char *)(mess + 1);
char *hostname = NULL, *offer_hostname = NULL, *client_hostname = NULL;
@@ -669,6 +669,9 @@ size_t dhcp_reply(struct daemon *daemon, struct dhcp_context *context, char *ifa
/* SELECTING or INIT_REBOOT */
mess->yiaddr = option_addr(opt);
/* send vendor and user class info for new or recreated lease */
do_classes = 1;
if ((opt = option_find(mess, sz, OPTION_SERVER_IDENTIFIER, INADDRSZ)))
{
/* SELECTING */
@@ -763,37 +766,10 @@ size_t dhcp_reply(struct daemon *daemon, struct dhcp_context *context, char *ifa
else if (!lease)
{
if (!(lease = lease_allocate(mess->yiaddr)))
message = _("no leases left");
if ((lease = lease_allocate(mess->yiaddr)))
do_classes = 1;
else
{
/* copy user-class and vendor class into new lease, for the script */
if ((opt = option_find(mess, sz, OPTION_USER_CLASS, 1)))
{
int len = option_len(opt);
unsigned char *ucp = option_ptr(opt);
/* If the user-class option started as counted strings, the first byte will be zero. */
if (len != 0 && ucp[0] == 0)
ucp++, len--;
if ((lease->userclass = malloc(len+1)))
{
memcpy(lease->userclass, ucp, len);
lease->userclass[len] = 0;
lease->userclass_len = len+1;
}
}
if ((opt = option_find(mess, sz, OPTION_VENDOR_ID, 1)))
{
int len = option_len(opt);
unsigned char *ucp = option_ptr(opt);
if ((lease->vendorclass = malloc(len+1)))
{
memcpy(lease->vendorclass, ucp, len);
lease->vendorclass[len] = 0;
lease->vendorclass_len = len+1;
}
}
}
message = _("no leases left");
}
}
@@ -818,8 +794,43 @@ size_t dhcp_reply(struct daemon *daemon, struct dhcp_context *context, char *ifa
}
else
{
if (!hostname_auth && (client_hostname = host_from_dns(daemon, mess->yiaddr)))
{
if (do_classes)
{
lease->changed = 1;
/* copy user-class and vendor class into new lease, for the script */
if ((opt = option_find(mess, sz, OPTION_USER_CLASS, 1)))
{
int len = option_len(opt);
unsigned char *ucp = option_ptr(opt);
/* If the user-class option started as counted strings, the first byte will be zero. */
if (len != 0 && ucp[0] == 0)
ucp++, len--;
if (lease->userclass)
free(lease->userclass);
if ((lease->userclass = malloc(len+1)))
{
memcpy(lease->userclass, ucp, len);
lease->userclass[len] = 0;
lease->userclass_len = len+1;
}
}
if ((opt = option_find(mess, sz, OPTION_VENDOR_ID, 1)))
{
int len = option_len(opt);
unsigned char *ucp = option_ptr(opt);
if (lease->vendorclass)
free(lease->vendorclass);
if ((lease->vendorclass = malloc(len+1)))
{
memcpy(lease->vendorclass, ucp, len);
lease->vendorclass[len] = 0;
lease->vendorclass_len = len+1;
}
}
}
if (!hostname_auth && (client_hostname = host_from_dns(daemon, mess->yiaddr)))
{
hostname = client_hostname;
hostname_auth = 1;
}