mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-06 15:51:41 +00:00
Compare commits
47
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e1551a1de | ||
|
|
af292dae6d | ||
|
|
933878f2c8 | ||
|
|
d54409dcd3 | ||
|
|
5bf50af2d0 | ||
|
|
c43b8a6326 | ||
|
|
b06900d1a3 | ||
|
|
f2f02fc3fb | ||
|
|
aaeea9f6ed | ||
|
|
2bb6f7735f | ||
|
|
40766e55e8 | ||
|
|
b5ea1cc255 | ||
|
|
6d8e8ac0fa | ||
|
|
24b167ada8 | ||
|
|
993f8cbb1b | ||
|
|
47a9516980 | ||
|
|
dc8a1b1bcf | ||
|
|
cdb755c5f1 | ||
|
|
063efb330a | ||
|
|
70772c9091 | ||
|
|
10d8540f62 | ||
|
|
006c162382 | ||
|
|
6799a46605 | ||
|
|
c4638f9e66 | ||
|
|
4b34f5d22f | ||
|
|
a0358e5ddb | ||
|
|
a03f8d4c37 | ||
|
|
c4a0937683 | ||
|
|
2f4c4b6076 | ||
|
|
a008a843cf | ||
|
|
d92c53e700 | ||
|
|
a754e1d7b2 | ||
|
|
8e9ffba66e | ||
|
|
15a97ad6fb | ||
|
|
91f4a5e4b5 | ||
|
|
0fa7e62947 | ||
|
|
62f992f06c | ||
|
|
a23949d44d | ||
|
|
b692f23466 | ||
|
|
8aa999ef69 | ||
|
|
20b215f293 | ||
|
|
e6096e643a | ||
|
|
8938ae05ac | ||
|
|
9d1b22aac2 | ||
|
|
1fc02680af | ||
|
|
4872aa747b | ||
|
|
7ea3d3fdca |
No files matched your search
@@ -1,3 +1,59 @@
|
|||||||
|
version 2.72
|
||||||
|
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
|
||||||
|
|
||||||
|
Add support for "ipsets" in *BSD, using pf. Thanks to
|
||||||
|
Sven Falempim for the patch.
|
||||||
|
|
||||||
|
Fix race condition which could lock up dnsmasq when an
|
||||||
|
interface goes down and up rapidly. Thanks to Conrad
|
||||||
|
Kostecki for helping to chase this down.
|
||||||
|
|
||||||
|
Add DBus methods SetFilterWin2KOption and SetBogusPrivOption
|
||||||
|
Thanks to the Smoothwall project for the patch.
|
||||||
|
|
||||||
|
Fix failure to build against Nettle-3.0. Thanks to Steven
|
||||||
|
Barth for spotting this and finding the fix.
|
||||||
|
|
||||||
|
When assigning existing DHCP leases to intefaces by comparing
|
||||||
|
networks, handle the case that two or more interfaces have the
|
||||||
|
same network part, but different prefix lengths (favour the
|
||||||
|
longer prefix length.) Thanks to Lung-Pin Chang for the
|
||||||
|
patch.
|
||||||
|
|
||||||
|
Add a mode which detects and removes DNS forwarding loops, ie
|
||||||
|
a query sent to an upstream server returns as a new query to
|
||||||
|
dnsmasq, and would therefore be forwarded again, resulting in
|
||||||
|
a query which loops many times before being dropped. Upstream
|
||||||
|
servers which loop back are disabled and this event is logged.
|
||||||
|
Thanks to Smoothwall for their sponsorship of this feature.
|
||||||
|
|
||||||
|
Include an RFC4191 route information option in router
|
||||||
|
advertisements for the prefix we're advertising. Thanks to
|
||||||
|
Ilya Ponetaev for the patch.
|
||||||
|
|
||||||
|
Extend --conf-dir to allow filtering of files. So
|
||||||
|
--conf-dir=/etc/dnsmasq.d,\*.conf
|
||||||
|
will load all the files in /etc/dnsmasq.d which end in .conf
|
||||||
|
|
||||||
|
|
||||||
|
version 2.71
|
||||||
|
Subtle change to error handling to help DNSSEC validation
|
||||||
|
when servers fail to provide NODATA answers for
|
||||||
|
non-existent DS records.
|
||||||
|
|
||||||
|
Tweak code which removes DNSSEC records from answers when
|
||||||
|
not required. Fixes broken answers when additional section
|
||||||
|
has real records in it. Thanks to Marco Davids for the bug
|
||||||
|
report.
|
||||||
|
|
||||||
|
Fix DNSSEC validation of ANY queries. Thanks to Marco Davids
|
||||||
|
for spotting that too.
|
||||||
|
|
||||||
|
Fix total DNS failure and 100% CPU use if cachesize set to zero,
|
||||||
|
regression introduced in 2.69. Thanks to James Hunt and
|
||||||
|
the Ubuntu crowd for assistance in fixing this.
|
||||||
|
|
||||||
|
|
||||||
version 2.70
|
version 2.70
|
||||||
Fix crash, introduced in 2.69, on TCP request when dnsmasq
|
Fix crash, introduced in 2.69, on TCP request when dnsmasq
|
||||||
compiled with DNSSEC support, but running without DNSSEC
|
compiled with DNSSEC support, but running without DNSSEC
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CON
|
|||||||
lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1`
|
lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1`
|
||||||
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
|
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
|
||||||
nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
|
nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
|
||||||
gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp`
|
gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
|
||||||
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
||||||
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ objs = cache.o rfc1035.o util.o option.o forward.o network.o \
|
|||||||
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \
|
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \
|
||||||
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
|
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
|
||||||
dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
|
dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
|
||||||
domain.o dnssec.o blockdata.o
|
domain.o dnssec.o blockdata.o tables.o loop.o
|
||||||
|
|
||||||
hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
|
hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
|
||||||
dns-protocol.h radv-protocol.h ip6addr.h
|
dns-protocol.h radv-protocol.h ip6addr.h
|
||||||
|
|||||||
+2
-1
@@ -9,7 +9,8 @@ LOCAL_SRC_FILES := bpf.c cache.c dbus.c dhcp.c dnsmasq.c \
|
|||||||
rfc2131.c tftp.c util.c conntrack.c \
|
rfc2131.c tftp.c util.c conntrack.c \
|
||||||
dhcp6.c rfc3315.c dhcp-common.c outpacket.c \
|
dhcp6.c rfc3315.c dhcp-common.c outpacket.c \
|
||||||
radv.c slaac.c auth.c ipset.c domain.c \
|
radv.c slaac.c auth.c ipset.c domain.c \
|
||||||
dnssec.c dnssec-openssl.c blockdata.c
|
dnssec.c dnssec-openssl.c blockdata.c tables.c \
|
||||||
|
loop.c
|
||||||
|
|
||||||
LOCAL_MODULE := dnsmasq
|
LOCAL_MODULE := dnsmasq
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -11,9 +11,14 @@ in=`cat`
|
|||||||
|
|
||||||
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
|
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
|
||||||
echo $in | grep $search >/dev/null 2>&1; then
|
echo $in | grep $search >/dev/null 2>&1; then
|
||||||
|
# Nasty, nasty, in --copy, arg 2 is another config to search for, use with NO_GMP
|
||||||
if [ $op = "--copy" ]; then
|
if [ $op = "--copy" ]; then
|
||||||
pkg="$*"
|
if grep "^\#[[:space:]]*define[[:space:]]*$pkg" config.h >/dev/null 2>&1 || \
|
||||||
|
echo $in | grep $pkg >/dev/null 2>&1; then
|
||||||
|
pkg=""
|
||||||
|
else
|
||||||
|
pkg="$*"
|
||||||
|
fi
|
||||||
elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
|
elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
|
||||||
echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
|
echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
|
||||||
pkg=`$pkg --static $op $*`
|
pkg=`$pkg --static $op $*`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=A lightweight DHCP and caching DNS server
|
Description=dnsmasq - A lightweight DHCP and caching DNS server
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=dbus
|
Type=dbus
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ ClearCache
|
|||||||
Returns nothing. Clears the domain name cache and re-reads
|
Returns nothing. Clears the domain name cache and re-reads
|
||||||
/etc/hosts. The same as sending dnsmasq a HUP signal.
|
/etc/hosts. The same as sending dnsmasq a HUP signal.
|
||||||
|
|
||||||
|
SetFilterWin2KOption
|
||||||
|
--------------------
|
||||||
|
Takes boolean, sets or resets the --filterwin2k option.
|
||||||
|
|
||||||
|
SetBogusPrivOption
|
||||||
|
------------------
|
||||||
|
Takes boolean, sets or resets the --bogus-priv option.
|
||||||
|
|
||||||
SetServers
|
SetServers
|
||||||
----------
|
----------
|
||||||
Returns nothing. Takes a set of arguments representing the new
|
Returns nothing. Takes a set of arguments representing the new
|
||||||
@@ -152,6 +160,15 @@ for SetServersEx is represented as
|
|||||||
"/eng.mycorp.com/lab.mycorp.com/1003:1234:abcd::1%eth0"
|
"/eng.mycorp.com/lab.mycorp.com/1003:1234:abcd::1%eth0"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
GetLoopServers
|
||||||
|
--------------
|
||||||
|
|
||||||
|
(Only available if dnsmasq compiled with HAVE_LOOP)
|
||||||
|
|
||||||
|
Return an array of strings, each string is the IP address of an upstream
|
||||||
|
server which has been found to loop queries back to this dnsmasq instance, and
|
||||||
|
it therefore not being used.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2. SIGNALS
|
2. SIGNALS
|
||||||
|
|||||||
Vendored
+36
@@ -1,3 +1,39 @@
|
|||||||
|
dnsmasq (2.72-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream.
|
||||||
|
* If dns-root-data package is installed, use it to set the DNSSEC
|
||||||
|
trust anchor(s). Recommend dns-root-data. (closes: #760460)
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 20 May 2014 21:01:11 +0000
|
||||||
|
|
||||||
|
dnsmasq (2.71-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream.
|
||||||
|
* Fix 100% CPU-usage bug when dnsmasq started with cachesize
|
||||||
|
set to zero. (LP: #1314697)
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Fri, 16 May 2014 20:17:10 +0000
|
||||||
|
|
||||||
|
dnsmasq (2.70-3) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Write a pid-file, even when being started using systemd, since
|
||||||
|
other components may wish to signal dnsmasq.
|
||||||
|
* Enable dnsmasq systemd unit on install. Otherwise dnsmasq does not run on
|
||||||
|
fresh installations (without administrator handholding) and even worse it
|
||||||
|
is disabled on systems switching from sysv to systemd. Modify
|
||||||
|
postinst/postrm exactly as dh_systemd would, add dependency on
|
||||||
|
init-system-helpers. Closes: #724602
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Sun, 11 May 2014 17:45:21 +0000
|
||||||
|
|
||||||
|
dnsmasq (2.70-2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Ensure daemon not stared if dnsmasq package has been removed,
|
||||||
|
even if dnsmasq-base is still installed. (closes: #746941)
|
||||||
|
* Tidy cruft in initscript. (closes: #746940)
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Sun, 04 May 2014 21:34:11 +0000
|
||||||
|
|
||||||
dnsmasq (2.70-1) unstable; urgency=low
|
dnsmasq (2.70-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream.
|
* New upstream.
|
||||||
|
|||||||
Vendored
+6
-3
@@ -2,13 +2,15 @@ Source: dnsmasq
|
|||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-depends: gettext, libnetfilter-conntrack-dev [linux-any],
|
Build-depends: gettext, libnetfilter-conntrack-dev [linux-any],
|
||||||
libidn11-dev, libdbus-1-dev (>=0.61), libgmp-dev, nettle-dev (>=2.4-3)
|
libidn11-dev, libdbus-1-dev (>=0.61), libgmp-dev,
|
||||||
|
nettle-dev (>=2.4-3)
|
||||||
Maintainer: Simon Kelley <simon@thekelleys.org.uk>
|
Maintainer: Simon Kelley <simon@thekelleys.org.uk>
|
||||||
Standards-Version: 3.9.3
|
Standards-Version: 3.9.5
|
||||||
|
|
||||||
Package: dnsmasq
|
Package: dnsmasq
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: netbase, dnsmasq-base(>= ${binary:Version})
|
Depends: netbase, dnsmasq-base(>= ${binary:Version}),
|
||||||
|
init-system-helpers (>= 1.18~)
|
||||||
Suggests: resolvconf
|
Suggests: resolvconf
|
||||||
Conflicts: resolvconf (<<1.15)
|
Conflicts: resolvconf (<<1.15)
|
||||||
Description: Small caching DNS proxy and DHCP/TFTP server
|
Description: Small caching DNS proxy and DHCP/TFTP server
|
||||||
@@ -26,6 +28,7 @@ Architecture: any
|
|||||||
Depends: adduser, ${shlibs:Depends}
|
Depends: adduser, ${shlibs:Depends}
|
||||||
Breaks: dnsmasq (<< 2.63-1~)
|
Breaks: dnsmasq (<< 2.63-1~)
|
||||||
Replaces: dnsmasq (<< 2.63-1~)
|
Replaces: dnsmasq (<< 2.63-1~)
|
||||||
|
Recommends: dns-root-data
|
||||||
Description: Small caching DNS proxy and DHCP/TFTP server
|
Description: Small caching DNS proxy and DHCP/TFTP server
|
||||||
This package contains the dnsmasq executable and documentation, but
|
This package contains the dnsmasq executable and documentation, but
|
||||||
not the infrastructure required to run it as a system daemon. For
|
not the infrastructure required to run it as a system daemon. For
|
||||||
|
|||||||
Vendored
+24
-5
@@ -29,6 +29,12 @@ if [ -r /etc/default/locale ]; then
|
|||||||
export LANG
|
export LANG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# /etc/dnsmasq.d/README is a non-conffile installed by the dnsmasq package.
|
||||||
|
# Should the dnsmasq package be removed, the following test ensures that
|
||||||
|
# the daemon is no longer started, even if the dnsmasq-base package is
|
||||||
|
# still in place.
|
||||||
|
test -e /etc/dnsmasq.d/README || exit 0
|
||||||
|
|
||||||
test -x $DAEMON || exit 0
|
test -x $DAEMON || exit 0
|
||||||
|
|
||||||
# Provide skeleton LSB log functions for backports which don't have LSB functions.
|
# Provide skeleton LSB log functions for backports which don't have LSB functions.
|
||||||
@@ -98,6 +104,16 @@ fi
|
|||||||
|
|
||||||
DNSMASQ_OPTS="$DNSMASQ_OPTS --local-service"
|
DNSMASQ_OPTS="$DNSMASQ_OPTS --local-service"
|
||||||
|
|
||||||
|
# If the dns-root-data package is installed, then the trust anchors will be
|
||||||
|
# available in $ROOT_DS, in BIND zone-file format. Reformat as dnsmasq
|
||||||
|
# --trust-anchor options.
|
||||||
|
|
||||||
|
ROOT_DS="/usr/share/dns/root.ds"
|
||||||
|
|
||||||
|
if [ -f $ROOT_DS ]; then
|
||||||
|
DNSMASQ_OPTS="$DNSMASQ_OPTS `sed -e s/". IN DS "/--trust-anchor=.,/ -e s/" "/,/g $ROOT_DS | tr '\n' ' '`"
|
||||||
|
fi
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
# Return
|
# Return
|
||||||
@@ -152,9 +168,6 @@ stop()
|
|||||||
# 2 if daemon could not be stopped
|
# 2 if daemon could not be stopped
|
||||||
# other if a failure occurred
|
# other if a failure occurred
|
||||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/dnsmasq/$NAME.pid --name $NAME
|
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/dnsmasq/$NAME.pid --name $NAME
|
||||||
RETVAL="$?"
|
|
||||||
[ "$RETVAL" = 2 ] && return 2
|
|
||||||
return "$RETVAL"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_resolvconf()
|
stop_resolvconf()
|
||||||
@@ -274,9 +287,15 @@ case "$1" in
|
|||||||
stop_resolvconf
|
stop_resolvconf
|
||||||
;;
|
;;
|
||||||
systemd-exec)
|
systemd-exec)
|
||||||
# --pid-file without argument disables writing a PIDfile, we don't need one with sytemd.
|
# /var/run may be volatile, so we need to ensure that
|
||||||
|
# /var/run/dnsmasq exists here as well as in postinst
|
||||||
|
if [ ! -d /var/run/dnsmasq ]; then
|
||||||
|
mkdir /var/run/dnsmasq || return 2
|
||||||
|
chown dnsmasq:nogroup /var/run/dnsmasq || return 2
|
||||||
|
fi
|
||||||
# Enable DBus by default because we use DBus activation with systemd.
|
# Enable DBus by default because we use DBus activation with systemd.
|
||||||
exec $DAEMON --keep-in-foreground --pid-file --enable-dbus \
|
exec $DAEMON --keep-in-foreground --enable-dbus \
|
||||||
|
-x /var/run/dnsmasq/$NAME.pid \
|
||||||
${MAILHOSTNAME:+ -m $MAILHOSTNAME} \
|
${MAILHOSTNAME:+ -m $MAILHOSTNAME} \
|
||||||
${MAILTARGET:+ -t $MAILTARGET} \
|
${MAILTARGET:+ -t $MAILTARGET} \
|
||||||
${DNSMASQ_USER:+ -u $DNSMASQ_USER} \
|
${DNSMASQ_USER:+ -u $DNSMASQ_USER} \
|
||||||
|
|||||||
Vendored
+16
@@ -1,6 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Code copied from dh_systemd_enable ----------------------
|
||||||
|
# This will only remove masks created by d-s-h on package removal.
|
||||||
|
deb-systemd-helper unmask dnsmasq.service >/dev/null || true
|
||||||
|
|
||||||
|
# was-enabled defaults to true, so new installations run enable.
|
||||||
|
if deb-systemd-helper --quiet was-enabled dnsmasq.service; then
|
||||||
|
# Enables the unit on first installation, creates new
|
||||||
|
# symlinks on upgrades if the unit file has changed.
|
||||||
|
deb-systemd-helper enable dnsmasq.service >/dev/null || true
|
||||||
|
else
|
||||||
|
# Update the statefile to add new symlinks (if any), which need to be
|
||||||
|
# cleaned up on purge. Also remove old symlinks.
|
||||||
|
deb-systemd-helper update-state dnsmasq.service >/dev/null || true
|
||||||
|
fi
|
||||||
|
# End code copied from dh_systemd_enable ------------------
|
||||||
|
|
||||||
if [ -x /etc/init.d/dnsmasq ]; then
|
if [ -x /etc/init.d/dnsmasq ]; then
|
||||||
update-rc.d dnsmasq defaults 15 85 >/dev/null
|
update-rc.d dnsmasq defaults 15 85 >/dev/null
|
||||||
|
|
||||||
|
|||||||
Vendored
+16
@@ -4,3 +4,19 @@ set -e
|
|||||||
if [ purge = "$1" ]; then
|
if [ purge = "$1" ]; then
|
||||||
update-rc.d dnsmasq remove >/dev/null
|
update-rc.d dnsmasq remove >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Code copied from dh_systemd_enable ----------------------
|
||||||
|
if [ "$1" = "remove" ]; then
|
||||||
|
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||||
|
deb-systemd-helper mask dnsmasq.service >/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "purge" ]; then
|
||||||
|
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||||
|
deb-systemd-helper purge dnsmasq.service >/dev/null
|
||||||
|
deb-systemd-helper unmask dnsmasq.service >/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# End code copied from dh_systemd_enable ------------------
|
||||||
|
|
||||||
Vendored
+8
-8
@@ -11,18 +11,16 @@
|
|||||||
|
|
||||||
package=dnsmasq-base
|
package=dnsmasq-base
|
||||||
|
|
||||||
CFLAGS = $(shell export DEB_BUILD_OPTIONS=$(DEB_BUILD_OPTIONS); dpkg-buildflags --get CFLAGS)
|
dpkg_buildflags := DEB_BUILD_MAINT_OPTIONS="hardening=+all" dpkg-buildflags
|
||||||
CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
|
|
||||||
|
CFLAGS = $(shell $(dpkg_buildflags) --get CFLAGS)
|
||||||
|
CFLAGS += $(shell $(dpkg_buildflags) --get CPPFLAGS)
|
||||||
CFLAGS += -Wall -W
|
CFLAGS += -Wall -W
|
||||||
|
|
||||||
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
|
LDFLAGS = $(shell $(dpkg_buildflags) --get LDFLAGS)
|
||||||
|
|
||||||
DEB_COPTS = $(COPTS)
|
DEB_COPTS = $(COPTS)
|
||||||
|
|
||||||
# The nettle library in Debian is too old to include
|
|
||||||
# ECC support.
|
|
||||||
DEB_COPTS += -DNO_NETTLE_ECC
|
|
||||||
|
|
||||||
TARGET = install-i18n
|
TARGET = install-i18n
|
||||||
|
|
||||||
DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
|
DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
|
||||||
@@ -134,7 +132,9 @@ binary-arch: checkroot
|
|||||||
-d debian/base/var/lib/misc
|
-d debian/base/var/lib/misc
|
||||||
make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=gcc
|
make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=gcc
|
||||||
ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
|
||||||
install -m 644 doc.html debian/base/usr/share/doc/$(package)/.
|
# Need to remove paypal links in Debian Package for policy reasons.
|
||||||
|
sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >debian/base/usr/share/doc/$(package)/doc.html
|
||||||
|
echo "</BODY>" >>debian/base/usr/share/doc/$(package)/doc.html
|
||||||
install -m 644 setup.html debian/base/usr/share/doc/$(package)/.
|
install -m 644 setup.html debian/base/usr/share/doc/$(package)/.
|
||||||
install -m 644 dnsmasq.conf.example debian/base/usr/share/doc/$(package)/examples/.
|
install -m 644 dnsmasq.conf.example debian/base/usr/share/doc/$(package)/examples/.
|
||||||
install -m 644 trust-anchors.conf debian/base/usr/share/$(package)/.
|
install -m 644 trust-anchors.conf debian/base/usr/share/$(package)/.
|
||||||
|
|||||||
Vendored
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=A lightweight DHCP and caching DNS server
|
Description=dnsmasq - A lightweight DHCP and caching DNS server
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=dbus
|
Type=dbus
|
||||||
@@ -13,9 +13,8 @@ ExecStartPre=/usr/sbin/dnsmasq --test
|
|||||||
# itself, when called with the "systemd-exec" function.
|
# itself, when called with the "systemd-exec" function.
|
||||||
#
|
#
|
||||||
# It also adds the command-line flags
|
# It also adds the command-line flags
|
||||||
# --keep-in-foreground --pid-file --enable-dbus
|
# --keep-in-foreground --enable-dbus
|
||||||
# to disable writing a pid-file (not needed with systemd) and
|
# to enable DBus by default because we use DBus activation.
|
||||||
# enable DBus by default because we use DBus activation.
|
|
||||||
#
|
#
|
||||||
ExecStart=/etc/init.d/dnsmasq systemd-exec
|
ExecStart=/etc/init.d/dnsmasq systemd-exec
|
||||||
|
|
||||||
|
|||||||
@@ -640,3 +640,9 @@
|
|||||||
# Include another lot of configuration options.
|
# Include another lot of configuration options.
|
||||||
#conf-file=/etc/dnsmasq.more.conf
|
#conf-file=/etc/dnsmasq.more.conf
|
||||||
#conf-dir=/etc/dnsmasq.d
|
#conf-dir=/etc/dnsmasq.d
|
||||||
|
|
||||||
|
# Include all the files in a directory except those ending in .bak
|
||||||
|
#conf-dir=/etc/dnsmasq.d,.bak
|
||||||
|
|
||||||
|
# Include all files in a directory which end in .conf
|
||||||
|
#conf-dir=/etc/dnsmasq.d/*.conf
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE> Dnsmasq - network services for small networks.</TITLE>
|
<TITLE> Dnsmasq - network services for small networks.</TITLE>
|
||||||
<link rel="icon"
|
<link rel="icon" href="http://www.thekelleys.org.uk/dnsmasq/images/favicon.ico">
|
||||||
href="http://www.thekelleys.org.uk/dnsmasq/images/favicon.ico">
|
|
||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY BGCOLOR="WHITE">
|
<BODY BGCOLOR="WHITE">
|
||||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
|||||||
+24
-4
@@ -334,6 +334,16 @@ it will send queries to just one server. Setting this flag forces
|
|||||||
dnsmasq to send all queries to all available servers. The reply from
|
dnsmasq to send all queries to all available servers. The reply from
|
||||||
the server which answers first will be returned to the original requester.
|
the server which answers first will be returned to the original requester.
|
||||||
.TP
|
.TP
|
||||||
|
.B --dns-loop-detect
|
||||||
|
Enable code to detect DNS forwarding loops; ie the situation where a query sent to one
|
||||||
|
of the upstream server eventually returns as a new query to the dnsmasq instance. The
|
||||||
|
process works by generating TXT queries of the form <hex>.test and sending them to
|
||||||
|
each upstream server. The hex is a UID which encodes the instance of dnsmasq sending the query
|
||||||
|
and the upstream server to which it was sent. If the query returns to the server which sent it, then
|
||||||
|
the upstream server through which it was sent is disabled and this event is logged. Each time the
|
||||||
|
set of upstream servers changes, the test is re-run on all of them, including ones which
|
||||||
|
were previously disabled.
|
||||||
|
.TP
|
||||||
.B --stop-dns-rebind
|
.B --stop-dns-rebind
|
||||||
Reject (and log) addresses from upstream nameservers which are in the
|
Reject (and log) addresses from upstream nameservers which are in the
|
||||||
private IP ranges. This blocks an attack where a browser behind a
|
private IP ranges. This blocks an attack where a browser behind a
|
||||||
@@ -794,7 +804,7 @@ and
|
|||||||
for details.)
|
for details.)
|
||||||
|
|
||||||
For IPv6, the mode may be some combination of
|
For IPv6, the mode may be some combination of
|
||||||
.B ra-only, slaac, ra-names, ra-stateless.
|
.B ra-only, slaac, ra-names, ra-stateless, ra-advrouter.
|
||||||
|
|
||||||
.B ra-only
|
.B ra-only
|
||||||
tells dnsmasq to offer Router Advertisement only on this subnet,
|
tells dnsmasq to offer Router Advertisement only on this subnet,
|
||||||
@@ -829,6 +839,11 @@ can be combined with
|
|||||||
and
|
and
|
||||||
.B slaac.
|
.B slaac.
|
||||||
|
|
||||||
|
.B ra-advrouter
|
||||||
|
enables a mode where router address(es) rather than prefix(es) are included in the advertisements.
|
||||||
|
This is described in RFC-3775 section 7.2 and is used in mobile IPv6. In this mode the interval option
|
||||||
|
is also included, as described in RFC-3775 section 7.3.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]
|
.B \-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]
|
||||||
Specify per host parameters for the DHCP server. This allows a machine
|
Specify per host parameters for the DHCP server. This allows a machine
|
||||||
@@ -1545,6 +1560,7 @@ Treat DHCP request packets arriving at any of the <alias> interfaces
|
|||||||
as if they had arrived at <interface>. This option is necessary when
|
as if they had arrived at <interface>. This option is necessary when
|
||||||
using "old style" bridging on BSD platforms, since
|
using "old style" bridging on BSD platforms, since
|
||||||
packets arrive at tap interfaces which don't have an IP address.
|
packets arrive at tap interfaces which don't have an IP address.
|
||||||
|
A trailing '*' wildcard can be used in each <alias>.
|
||||||
.TP
|
.TP
|
||||||
.B \-s, --domain=<domain>[,<address range>[,local]]
|
.B \-s, --domain=<domain>[,<address range>[,local]]
|
||||||
Specifies DNS domains for the DHCP server. Domains may be be given
|
Specifies DNS domains for the DHCP server. Domains may be be given
|
||||||
@@ -1709,12 +1725,16 @@ Specify a different configuration file. The conf-file option is also allowed in
|
|||||||
configuration files, to include multiple configuration files. A
|
configuration files, to include multiple configuration files. A
|
||||||
filename of "-" causes dnsmasq to read configuration from stdin.
|
filename of "-" causes dnsmasq to read configuration from stdin.
|
||||||
.TP
|
.TP
|
||||||
.B \-7, --conf-dir=<directory>[,<file-extension>......]
|
.B \-7, --conf-dir=<directory>[,<file-extension>......],
|
||||||
Read all the files in the given directory as configuration
|
Read all the files in the given directory as configuration
|
||||||
files. If extension(s) are given, any files which end in those
|
files. If extension(s) are given, any files which end in those
|
||||||
extensions are skipped. Any files whose names end in ~ or start with . or start and end
|
extensions are skipped. Any files whose names end in ~ or start with . or start and end
|
||||||
with # are always skipped. This flag may be given on the command
|
with # are always skipped. If the extension starts with * then only files
|
||||||
line or in a configuration file.
|
which have that extension are loaded. So
|
||||||
|
.B --conf-dir=/path/to/dir,*.conf
|
||||||
|
loads all files with the suffix .conf in /path/to/dir. This flag may be given on the command
|
||||||
|
line or in a configuration file. If giving it on the command line, be sure to
|
||||||
|
escape * characters.
|
||||||
.TP
|
.TP
|
||||||
.B --servers-file=<file>
|
.B --servers-file=<file>
|
||||||
A special case of
|
A special case of
|
||||||
|
|||||||
+1
-1
@@ -1659,7 +1659,7 @@ Traiter les requêtes DHCP arrivant sur n'importe laquelle des interfaces <alias
|
|||||||
comme si elles arrivaient de l'interface <interface>. Cette option est
|
comme si elles arrivaient de l'interface <interface>. Cette option est
|
||||||
nécessaire lors de l'utilisation de pont ethernet "ancien mode" sur plate-forme
|
nécessaire lors de l'utilisation de pont ethernet "ancien mode" sur plate-forme
|
||||||
BSD, puisque dans ce cas les paquets arrivent sur des interfaces "tap" n'ont
|
BSD, puisque dans ce cas les paquets arrivent sur des interfaces "tap" n'ont
|
||||||
pas d'adresse IP.
|
pas d'adresse IP. Chaque <alias> peut finir avec un simple '*' joker.
|
||||||
.TP
|
.TP
|
||||||
.B \-s, --domain=<domaine>[,<gamme d'adresses>[,local]]
|
.B \-s, --domain=<domaine>[,<gamme d'adresses>[,local]]
|
||||||
Spécifie le domaine du serveur DHCP. Le domaine peut être donné de manière
|
Spécifie le domaine du serveur DHCP. Le domaine peut être donné de manière
|
||||||
|
|||||||
@@ -9,17 +9,19 @@
|
|||||||
# Simon Kelley <simon@thekelleys.org.uk>, 2005.
|
# Simon Kelley <simon@thekelleys.org.uk>, 2005.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: dnsmasq 2.53rc1\n"
|
"Project-Id-Version: dnsmasq 2.70\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2009-06-18 12:24+0100\n"
|
"POT-Creation-Date: 2009-06-18 12:24+0100\n"
|
||||||
"PO-Revision-Date: 2012-04-05 17:54+0100\n"
|
"PO-Revision-Date: 2014-05-01 22:51+0100\n"
|
||||||
"Last-Translator: Conrad Kostecki <ConiKost@gmx.de>\n"
|
"Last-Translator: Conrad Kostecki <ck@conrad-kostecki.de>\n"
|
||||||
"Language-Team: German <de@li.org>\n"
|
"Language-Team: German <de@li.org>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Generator: Poedit 1.6.5\n"
|
||||||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||||||
|
|
||||||
#: cache.c:821
|
#: cache.c:821
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -57,8 +59,12 @@ msgstr "%s ist ein CNAME, weise es der DHCP-Lease von %s nicht zu"
|
|||||||
|
|
||||||
#: cache.c:1114
|
#: cache.c:1114
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "not giving name %s to the DHCP lease of %s because the name exists in %s with address %s"
|
msgid ""
|
||||||
msgstr "Name %s wurde dem DHCP-Lease von %s nicht zugewiesen, da der Name in %s bereits mit Adresse %s existiert"
|
"not giving name %s to the DHCP lease of %s because the name exists in %s "
|
||||||
|
"with address %s"
|
||||||
|
msgstr ""
|
||||||
|
"Name %s wurde dem DHCP-Lease von %s nicht zugewiesen, da der Name in %s "
|
||||||
|
"bereits mit Adresse %s existiert"
|
||||||
|
|
||||||
#: cache.c:1159
|
#: cache.c:1159
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -68,7 +74,9 @@ msgstr "Zeit %lu"
|
|||||||
#: cache.c:1160
|
#: cache.c:1160
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cache size %d, %d/%d cache insertions re-used unexpired cache entries."
|
msgid "cache size %d, %d/%d cache insertions re-used unexpired cache entries."
|
||||||
msgstr "Cache Größe %d, %d/%d Cache-Einfügungen verwendeten nicht abgelaufene Cache-Einträge wieder."
|
msgstr ""
|
||||||
|
"Cache Größe %d, %d/%d Cache-Einfügungen verwendeten nicht abgelaufene Cache-"
|
||||||
|
"Einträge wieder."
|
||||||
|
|
||||||
#: cache.c:1162
|
#: cache.c:1162
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -78,12 +86,13 @@ msgstr "%u weitergeleitete Anfragen, %u lokal beantwortete Anfragen"
|
|||||||
#: cache.c:1165
|
#: cache.c:1165
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "queries for authoritative zones %u"
|
msgid "queries for authoritative zones %u"
|
||||||
msgstr ""
|
msgstr "Anfragen nach autoritativen Zonen %u"
|
||||||
|
|
||||||
#: cache.c:1188
|
#: cache.c:1188
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "server %s#%d: queries sent %u, retried or failed %u"
|
msgid "server %s#%d: queries sent %u, retried or failed %u"
|
||||||
msgstr "Server %s#%d: %u Anfragen gesendet, %u erneut versucht oder fehlgeschlagen"
|
msgstr ""
|
||||||
|
"Server %s#%d: %u Anfragen gesendet, %u erneut versucht oder fehlgeschlagen"
|
||||||
|
|
||||||
#: util.c:67
|
#: util.c:67
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -126,11 +135,13 @@ msgstr "IP-Adresse für alle Hosts in angebenen Domänen festlegen."
|
|||||||
# from the manpage instead. -- MA
|
# from the manpage instead. -- MA
|
||||||
#: option.c:303
|
#: option.c:303
|
||||||
msgid "Fake reverse lookups for RFC1918 private address ranges."
|
msgid "Fake reverse lookups for RFC1918 private address ranges."
|
||||||
msgstr "Für private Adressbereiche nach RFC1918 \"keine solche Domain\" liefern."
|
msgstr ""
|
||||||
|
"Für private Adressbereiche nach RFC1918 \"keine solche Domain\" liefern."
|
||||||
|
|
||||||
#: option.c:304
|
#: option.c:304
|
||||||
msgid "Treat ipaddr as NXDOMAIN (defeats Verisign wildcard)."
|
msgid "Treat ipaddr as NXDOMAIN (defeats Verisign wildcard)."
|
||||||
msgstr "Diese IP-Adresse als NXDOMAIN interpretieren (wehrt \"Suchhilfen\" ab)."
|
msgstr ""
|
||||||
|
"Diese IP-Adresse als NXDOMAIN interpretieren (wehrt \"Suchhilfen\" ab)."
|
||||||
|
|
||||||
#: option.c:305
|
#: option.c:305
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -325,11 +336,13 @@ msgstr "Gültigkeitsdauer für Antworten aus /etc/hosts festlegen."
|
|||||||
|
|
||||||
#: option.c:350
|
#: option.c:350
|
||||||
msgid "Specify time-to-live in seconds for negative caching."
|
msgid "Specify time-to-live in seconds for negative caching."
|
||||||
msgstr "Gültigkeitsdauer in Sekunden für Caching negativer Ergebnisse festlegen."
|
msgstr ""
|
||||||
|
"Gültigkeitsdauer in Sekunden für Caching negativer Ergebnisse festlegen."
|
||||||
|
|
||||||
#: option.c:351
|
#: option.c:351
|
||||||
msgid "Specify time-to-live in seconds for maximum TTL to send to clients."
|
msgid "Specify time-to-live in seconds for maximum TTL to send to clients."
|
||||||
msgstr "Gültigkeitsdauer in Sekunden für Caching negativer Ergebnisse festlegen."
|
msgstr ""
|
||||||
|
"Gültigkeitsdauer in Sekunden für Caching negativer Ergebnisse festlegen."
|
||||||
|
|
||||||
#: option.c:352
|
#: option.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -354,7 +367,8 @@ msgstr "SRV-Eintrag festlegen."
|
|||||||
|
|
||||||
#: option.c:357
|
#: option.c:357
|
||||||
msgid "Display this message. Use --help dhcp for known DHCP options."
|
msgid "Display this message. Use --help dhcp for known DHCP options."
|
||||||
msgstr "Diese Hilfe anzeigen. Benutzen Sie --help dhcp für bekannte DHCP-Optionen."
|
msgstr ""
|
||||||
|
"Diese Hilfe anzeigen. Benutzen Sie --help dhcp für bekannte DHCP-Optionen."
|
||||||
|
|
||||||
#: option.c:358
|
#: option.c:358
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -409,7 +423,9 @@ msgstr "MAC-Adresse (mit Jokerzeichen) auf Netzmarke abbilden."
|
|||||||
|
|
||||||
#: option.c:370
|
#: option.c:370
|
||||||
msgid "Treat DHCP requests on aliases as arriving from interface."
|
msgid "Treat DHCP requests on aliases as arriving from interface."
|
||||||
msgstr "DHCP-Anfragen von Alias-Schnittstellen für die Hauptschnittstelle beantworten."
|
msgstr ""
|
||||||
|
"DHCP-Anfragen von Alias-Schnittstellen für die Hauptschnittstelle "
|
||||||
|
"beantworten."
|
||||||
|
|
||||||
#: option.c:371
|
#: option.c:371
|
||||||
msgid "Disable ICMP echo address checking in the DHCP server."
|
msgid "Disable ICMP echo address checking in the DHCP server."
|
||||||
@@ -421,7 +437,8 @@ msgstr "Skript, das bei Erzeugung/Löschung einer DHCP-Lease laufen soll."
|
|||||||
|
|
||||||
#: option.c:373
|
#: option.c:373
|
||||||
msgid "Lua script to run on DHCP lease creation and destruction."
|
msgid "Lua script to run on DHCP lease creation and destruction."
|
||||||
msgstr "Lua-Skript, welches bei Erzeugung/Löschung eines DHCP-Leases laufen soll."
|
msgstr ""
|
||||||
|
"Lua-Skript, welches bei Erzeugung/Löschung eines DHCP-Leases laufen soll."
|
||||||
|
|
||||||
#: option.c:374
|
#: option.c:374
|
||||||
msgid "Run lease-change scripts as this user."
|
msgid "Run lease-change scripts as this user."
|
||||||
@@ -455,7 +472,9 @@ msgstr "Von DHCP-Clients gelieferte Hostnamen ignorieren."
|
|||||||
|
|
||||||
#: option.c:381
|
#: option.c:381
|
||||||
msgid "Do NOT reuse filename and server fields for extra DHCP options."
|
msgid "Do NOT reuse filename and server fields for extra DHCP options."
|
||||||
msgstr "Dateinamen und Server-Datenfehler für zusätzliche DHCP-Optionen NICHT wiederverwenden."
|
msgstr ""
|
||||||
|
"Dateinamen und Server-Datenfehler für zusätzliche DHCP-Optionen NICHT "
|
||||||
|
"wiederverwenden."
|
||||||
|
|
||||||
#: option.c:382
|
#: option.c:382
|
||||||
msgid "Enable integrated read-only TFTP server."
|
msgid "Enable integrated read-only TFTP server."
|
||||||
@@ -471,7 +490,9 @@ msgstr "IP-Adresse des Klienten an tftp-root anhängen."
|
|||||||
|
|
||||||
#: option.c:385
|
#: option.c:385
|
||||||
msgid "Allow access only to files owned by the user running dnsmasq."
|
msgid "Allow access only to files owned by the user running dnsmasq."
|
||||||
msgstr "Zugriff nur auf Dateien gestatten, die dem dnsmasq aufrufenden Benutzer gehören."
|
msgstr ""
|
||||||
|
"Zugriff nur auf Dateien gestatten, die dem dnsmasq aufrufenden Benutzer "
|
||||||
|
"gehören."
|
||||||
|
|
||||||
#: option.c:386
|
#: option.c:386
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -484,7 +505,7 @@ msgstr "TFTP-Blockgrößen-Erweiterung abschalten."
|
|||||||
|
|
||||||
#: option.c:388
|
#: option.c:388
|
||||||
msgid "Convert TFTP filenames to lowercase"
|
msgid "Convert TFTP filenames to lowercase"
|
||||||
msgstr ""
|
msgstr "Konvertiere TFTP Dateinamen in Kleinschreibung"
|
||||||
|
|
||||||
#: option.c:389
|
#: option.c:389
|
||||||
msgid "Ephemeral port range for use by TFTP transfers."
|
msgid "Ephemeral port range for use by TFTP transfers."
|
||||||
@@ -496,11 +517,13 @@ msgstr "Erweiterte DHCP-Protokollierung."
|
|||||||
|
|
||||||
#: option.c:391
|
#: option.c:391
|
||||||
msgid "Enable async. logging; optionally set queue length."
|
msgid "Enable async. logging; optionally set queue length."
|
||||||
msgstr "Asynchrone Protokollierung einschalten, opt. Warteschlangenlänge festlegen."
|
msgstr ""
|
||||||
|
"Asynchrone Protokollierung einschalten, opt. Warteschlangenlänge festlegen."
|
||||||
|
|
||||||
#: option.c:392
|
#: option.c:392
|
||||||
msgid "Stop DNS rebinding. Filter private IP ranges when resolving."
|
msgid "Stop DNS rebinding. Filter private IP ranges when resolving."
|
||||||
msgstr "DNS-Rebinding unterbinden, private IP-Bereiche bei der Auflösung ausfiltern."
|
msgstr ""
|
||||||
|
"DNS-Rebinding unterbinden, private IP-Bereiche bei der Auflösung ausfiltern."
|
||||||
|
|
||||||
#: option.c:393
|
#: option.c:393
|
||||||
msgid "Allow rebinding of 127.0.0.0/8, for RBL servers."
|
msgid "Allow rebinding of 127.0.0.0/8, for RBL servers."
|
||||||
@@ -528,7 +551,8 @@ msgstr "DNS-NAPTR-Eintrag festlegen."
|
|||||||
|
|
||||||
#: option.c:399
|
#: option.c:399
|
||||||
msgid "Specify lowest port available for DNS query transmission."
|
msgid "Specify lowest port available for DNS query transmission."
|
||||||
msgstr "Niedrigsten verfügbaren Port für Übertragung von DNS-Anfragen festlegen."
|
msgstr ""
|
||||||
|
"Niedrigsten verfügbaren Port für Übertragung von DNS-Anfragen festlegen."
|
||||||
|
|
||||||
#: option.c:400
|
#: option.c:400
|
||||||
msgid "Use only fully qualified domain names for DHCP clients."
|
msgid "Use only fully qualified domain names for DHCP clients."
|
||||||
@@ -545,7 +569,7 @@ msgstr "Diese DHCP-Relais als vollwertige Proxies verwenden."
|
|||||||
|
|
||||||
#: option.c:403
|
#: option.c:403
|
||||||
msgid "Relay DHCP requests to a remote server"
|
msgid "Relay DHCP requests to a remote server"
|
||||||
msgstr ""
|
msgstr "Leute DHCP Anfragen an entfernten Server weiter"
|
||||||
|
|
||||||
#: option.c:404
|
#: option.c:404
|
||||||
msgid "Specify alias name for LOCAL DNS name."
|
msgid "Specify alias name for LOCAL DNS name."
|
||||||
@@ -568,9 +592,10 @@ msgid "Add requestor's MAC address to forwarded DNS queries."
|
|||||||
msgstr "Anfragende MAC-Adresse in die weiterleitende DNS-Anfrage einfügen"
|
msgstr "Anfragende MAC-Adresse in die weiterleitende DNS-Anfrage einfügen"
|
||||||
|
|
||||||
#: option.c:409
|
#: option.c:409
|
||||||
#, fuzzy
|
|
||||||
msgid "Add requestor's IP subnet to forwarded DNS queries."
|
msgid "Add requestor's IP subnet to forwarded DNS queries."
|
||||||
msgstr "Anfragende MAC-Adresse in die weiterleitende DNS-Anfrage einfügen"
|
msgstr ""
|
||||||
|
"Füge das IP-Subnetz des Anfragenden in die weitergeleiteten DNS-Anfragen "
|
||||||
|
"hinzu."
|
||||||
|
|
||||||
#: option.c:410
|
#: option.c:410
|
||||||
msgid "Proxy DNSSEC validation results from upstream nameservers."
|
msgid "Proxy DNSSEC validation results from upstream nameservers."
|
||||||
@@ -582,7 +607,8 @@ msgstr "Versuche sequenzielle IP-Adressen an DHCP-Klienten zu vergeben."
|
|||||||
|
|
||||||
#: option.c:412
|
#: option.c:412
|
||||||
msgid "Copy connection-track mark from queries to upstream connections."
|
msgid "Copy connection-track mark from queries to upstream connections."
|
||||||
msgstr "Kopiere \"connection-track mark\" von Anfragen nach Upstream-Verbindungen."
|
msgstr ""
|
||||||
|
"Kopiere \"connection-track mark\" von Anfragen nach Upstream-Verbindungen."
|
||||||
|
|
||||||
#: option.c:413
|
#: option.c:413
|
||||||
msgid "Allow DHCP clients to do their own DDNS updates."
|
msgid "Allow DHCP clients to do their own DDNS updates."
|
||||||
@@ -590,78 +616,78 @@ msgstr "Erlaube DHCP-Klienten ihre eigenen DDNS-Updates durchzuführen."
|
|||||||
|
|
||||||
#: option.c:414
|
#: option.c:414
|
||||||
msgid "Send router-advertisements for interfaces doing DHCPv6"
|
msgid "Send router-advertisements for interfaces doing DHCPv6"
|
||||||
msgstr "Sende \"Router-Advertisments\" für Netzwerkschnittstellen, welche DHCPv6 nutzen"
|
msgstr ""
|
||||||
|
"Sende \"Router-Advertisments\" für Netzwerkschnittstellen, welche DHCPv6 "
|
||||||
|
"nutzen"
|
||||||
|
|
||||||
#: option.c:415
|
#: option.c:415
|
||||||
msgid "Specify DUID_EN-type DHCPv6 server DUID"
|
msgid "Specify DUID_EN-type DHCPv6 server DUID"
|
||||||
msgstr ""
|
msgstr "Spezifiziere DUID_EN-type DHCPv6 Server DUID"
|
||||||
|
|
||||||
#: option.c:416
|
#: option.c:416
|
||||||
#, fuzzy
|
|
||||||
msgid "Specify host (A/AAAA and PTR) records"
|
msgid "Specify host (A/AAAA and PTR) records"
|
||||||
msgstr "Einen MX-Eintrag festlegen."
|
msgstr "Spezifiziere Host (A/AAAA und PTR) Einträge"
|
||||||
|
|
||||||
#: option.c:417
|
#: option.c:417
|
||||||
#, fuzzy
|
|
||||||
msgid "Specify arbitrary DNS resource record"
|
msgid "Specify arbitrary DNS resource record"
|
||||||
msgstr "DNS-TXT-Eintrag festlegen."
|
msgstr "Spezifiziere einen beliebiegen DNS Eintrag"
|
||||||
|
|
||||||
#: option.c:418
|
#: option.c:418
|
||||||
#, fuzzy
|
|
||||||
msgid "Bind to interfaces in use - check for new interfaces"
|
msgid "Bind to interfaces in use - check for new interfaces"
|
||||||
msgstr "unbekannte Schnittstelle %s in bridge-interface"
|
msgstr "Bindung zu Schnittstellen in Benutzung - prüfe auf neue Schnittstellen"
|
||||||
|
|
||||||
#: option.c:419
|
#: option.c:419
|
||||||
msgid "Export local names to global DNS"
|
msgid "Export local names to global DNS"
|
||||||
msgstr ""
|
msgstr "Exportiere lokale Namen in das globale DNS"
|
||||||
|
|
||||||
#: option.c:420
|
#: option.c:420
|
||||||
msgid "Domain to export to global DNS"
|
msgid "Domain to export to global DNS"
|
||||||
msgstr ""
|
msgstr "Domain für das Exportieren des globalen DNS"
|
||||||
|
|
||||||
#: option.c:421
|
#: option.c:421
|
||||||
msgid "Set TTL for authoritative replies"
|
msgid "Set TTL for authoritative replies"
|
||||||
msgstr ""
|
msgstr "Setzte TTL für autoritative Antworten"
|
||||||
|
|
||||||
#: option.c:422
|
#: option.c:422
|
||||||
msgid "Set authoritive zone information"
|
msgid "Set authoritive zone information"
|
||||||
msgstr ""
|
msgstr "Setze autoritative Zoneninformationen"
|
||||||
|
|
||||||
#: option.c:423
|
#: option.c:423
|
||||||
msgid "Secondary authoritative nameservers for forward domains"
|
msgid "Secondary authoritative nameservers for forward domains"
|
||||||
msgstr ""
|
msgstr "Sekundärer autoritativer Nameserver für weitergeleitete Domains"
|
||||||
|
|
||||||
#: option.c:424
|
#: option.c:424
|
||||||
msgid "Peers which are allowed to do zone transfer"
|
msgid "Peers which are allowed to do zone transfer"
|
||||||
msgstr ""
|
msgstr "Peers welche einen Zonentransfer durchführen dürfen"
|
||||||
|
|
||||||
#: option.c:425
|
#: option.c:425
|
||||||
msgid "Specify ipsets to which matching domains should be added"
|
msgid "Specify ipsets to which matching domains should be added"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Spezifiziere IPSets zu welcher passende Domains hinzugefügt werden sollen"
|
||||||
|
|
||||||
#: option.c:426
|
#: option.c:426
|
||||||
msgid "Specify a domain and address range for synthesised names"
|
msgid "Specify a domain and address range for synthesised names"
|
||||||
msgstr ""
|
msgstr "Spezifiziere eine Domain und Adressbereich für synthetisierte Namen"
|
||||||
|
|
||||||
#: option.c:428
|
#: option.c:428
|
||||||
msgid "Specify DHCPv6 prefix class"
|
msgid "Specify DHCPv6 prefix class"
|
||||||
msgstr ""
|
msgstr "Spezifiziere DHCPv6 Prefix Klasse"
|
||||||
|
|
||||||
#: option.c:430
|
#: option.c:430
|
||||||
msgid "Set priority, resend-interval and router-lifetime"
|
msgid "Set priority, resend-interval and router-lifetime"
|
||||||
msgstr ""
|
msgstr "Setze Priorität, Intervall des erneuten Sendens und Router Lebenszeit"
|
||||||
|
|
||||||
#: option.c:431
|
#: option.c:431
|
||||||
msgid "Do not log routine DHCP."
|
msgid "Do not log routine DHCP."
|
||||||
msgstr ""
|
msgstr "Protokolliere kein DHCP."
|
||||||
|
|
||||||
#: option.c:432
|
#: option.c:432
|
||||||
msgid "Do not log routine DHCPv6."
|
msgid "Do not log routine DHCPv6."
|
||||||
msgstr ""
|
msgstr "Protokolliere kein DHCPv6."
|
||||||
|
|
||||||
#: option.c:433
|
#: option.c:433
|
||||||
msgid "Do not log RA."
|
msgid "Do not log RA."
|
||||||
msgstr ""
|
msgstr "RA nicht protokollieren."
|
||||||
|
|
||||||
#: option.c:618
|
#: option.c:618
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -695,9 +721,8 @@ msgid "bad interface name"
|
|||||||
msgstr "unzulässiger Schnittestellenname"
|
msgstr "unzulässiger Schnittestellenname"
|
||||||
|
|
||||||
#: option.c:742
|
#: option.c:742
|
||||||
#, fuzzy
|
|
||||||
msgid "bad address"
|
msgid "bad address"
|
||||||
msgstr "Fehlerhafte IP-Adresse"
|
msgstr "Fehlerhafte Adresse"
|
||||||
|
|
||||||
#: option.c:876
|
#: option.c:876
|
||||||
msgid "unsupported encapsulation for IPv6 option"
|
msgid "unsupported encapsulation for IPv6 option"
|
||||||
@@ -747,7 +772,9 @@ msgstr "Kann auf %s nicht zugreifen: %s"
|
|||||||
|
|
||||||
#: option.c:1466
|
#: option.c:1466
|
||||||
msgid "setting log facility is not possible under Android"
|
msgid "setting log facility is not possible under Android"
|
||||||
msgstr "Die Einstellung Protokolliereinrichtung kann unter Android nicht gesetzt werden"
|
msgstr ""
|
||||||
|
"Die Einstellung Protokolliereinrichtung kann unter Android nicht gesetzt "
|
||||||
|
"werden"
|
||||||
|
|
||||||
#: option.c:1475
|
#: option.c:1475
|
||||||
msgid "bad log facility"
|
msgid "bad log facility"
|
||||||
@@ -771,21 +798,23 @@ msgstr "unter uClinux ist die Skriptausführung nicht möglich"
|
|||||||
|
|
||||||
#: option.c:1557
|
#: option.c:1557
|
||||||
msgid "recompile with HAVE_SCRIPT defined to enable lease-change scripts"
|
msgid "recompile with HAVE_SCRIPT defined to enable lease-change scripts"
|
||||||
msgstr "Neuübersetzung mit HAVE_SCRIPT nötig, um Lease-Änderungs-Skripte auszuführen"
|
msgstr ""
|
||||||
|
"Neuübersetzung mit HAVE_SCRIPT nötig, um Lease-Änderungs-Skripte auszuführen"
|
||||||
|
|
||||||
#: option.c:1561
|
#: option.c:1561
|
||||||
msgid "recompile with HAVE_LUASCRIPT defined to enable Lua scripts"
|
msgid "recompile with HAVE_LUASCRIPT defined to enable Lua scripts"
|
||||||
msgstr "Um Benutzerdefinierte Lua-Scripte zu ermöglichen, muss mit HAVE_LUASCRIPT neu kompiliert werden"
|
msgstr ""
|
||||||
|
"Um Benutzerdefinierte Lua-Scripte zu ermöglichen, muss mit HAVE_LUASCRIPT "
|
||||||
|
"neu kompiliert werden"
|
||||||
|
|
||||||
#: option.c:1802 option.c:1863 option.c:1933
|
#: option.c:1802 option.c:1863 option.c:1933
|
||||||
#, fuzzy
|
|
||||||
msgid "bad prefix"
|
msgid "bad prefix"
|
||||||
msgstr "unzulässiger Port"
|
msgstr "unzulässiger Präfix"
|
||||||
|
|
||||||
#: option.c:2167
|
#: option.c:2167
|
||||||
#, fuzzy
|
|
||||||
msgid "recompile with HAVE_IPSET defined to enable ipset directives"
|
msgid "recompile with HAVE_IPSET defined to enable ipset directives"
|
||||||
msgstr "Um Benutzerdefinierte Lua-Scripte zu ermöglichen, muss mit HAVE_LUASCRIPT neu kompiliert werden"
|
msgstr ""
|
||||||
|
"Um IPSet-Direktiven zu aktivieren, muss mit HAVE_IPSET neu übersetzt werden"
|
||||||
|
|
||||||
#: option.c:2347
|
#: option.c:2347
|
||||||
msgid "bad port range"
|
msgid "bad port range"
|
||||||
@@ -808,19 +837,16 @@ msgid "inconsistent DHCP range"
|
|||||||
msgstr "inkonsistenter DHCP-Bereich"
|
msgstr "inkonsistenter DHCP-Bereich"
|
||||||
|
|
||||||
#: option.c:2527
|
#: option.c:2527
|
||||||
#, fuzzy
|
|
||||||
msgid "prefix length must be exactly 64 for RA subnets"
|
msgid "prefix length must be exactly 64 for RA subnets"
|
||||||
msgstr "Der Prefix muss mindestens 64 sein"
|
msgstr "Die Präfixlenge muss genau 64 für RA Subnetze sein"
|
||||||
|
|
||||||
#: option.c:2529
|
#: option.c:2529
|
||||||
#, fuzzy
|
|
||||||
msgid "prefix length must be exactly 64 for subnet constructors"
|
msgid "prefix length must be exactly 64 for subnet constructors"
|
||||||
msgstr "Der Prefix muss mindestens 64 sein"
|
msgstr "Die Präfixlenge muss genau 64 für Subnet Konstruktoren sein"
|
||||||
|
|
||||||
#: option.c:2533
|
#: option.c:2533
|
||||||
#, fuzzy
|
|
||||||
msgid "prefix length must be at least 64"
|
msgid "prefix length must be at least 64"
|
||||||
msgstr "Der Prefix muss mindestens 64 sein"
|
msgstr "Die Präfixlänge muss mindestens 64 sein"
|
||||||
|
|
||||||
#: option.c:2536
|
#: option.c:2536
|
||||||
msgid "inconsistent DHCPv6 range"
|
msgid "inconsistent DHCPv6 range"
|
||||||
@@ -828,7 +854,7 @@ msgstr "Inkonsistenter DHCPv6-Bereich"
|
|||||||
|
|
||||||
#: option.c:2547
|
#: option.c:2547
|
||||||
msgid "prefix must be zero with \"constructor:\" argument"
|
msgid "prefix must be zero with \"constructor:\" argument"
|
||||||
msgstr ""
|
msgstr "Prefix muss mit dem \"constructor:\" Argument Null sein"
|
||||||
|
|
||||||
#: option.c:2658 option.c:2706
|
#: option.c:2658 option.c:2706
|
||||||
msgid "bad hex constant"
|
msgid "bad hex constant"
|
||||||
@@ -839,9 +865,9 @@ msgid "cannot match tags in --dhcp-host"
|
|||||||
msgstr "Kann die Tags in --dhcp-host nicht abgleichen"
|
msgstr "Kann die Tags in --dhcp-host nicht abgleichen"
|
||||||
|
|
||||||
#: option.c:2728
|
#: option.c:2728
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "duplicate dhcp-host IP address %s"
|
msgid "duplicate dhcp-host IP address %s"
|
||||||
msgstr "doppelte IP-Adresse %s in %s."
|
msgstr "doppelte dhcp-host IP-Adresse %s"
|
||||||
|
|
||||||
#: option.c:2784
|
#: option.c:2784
|
||||||
msgid "bad DHCP host name"
|
msgid "bad DHCP host name"
|
||||||
@@ -860,17 +886,16 @@ msgid "bad dhcp-proxy address"
|
|||||||
msgstr "Fehlerhafte DHCP-Proxy-Adresse"
|
msgstr "Fehlerhafte DHCP-Proxy-Adresse"
|
||||||
|
|
||||||
#: option.c:3278
|
#: option.c:3278
|
||||||
#, fuzzy
|
|
||||||
msgid "Bad dhcp-relay"
|
msgid "Bad dhcp-relay"
|
||||||
msgstr "unzulässiger DHCP-Bereich"
|
msgstr "unzulässiger dhcp-relay"
|
||||||
|
|
||||||
#: option.c:3304
|
#: option.c:3304
|
||||||
msgid "bad RA-params"
|
msgid "bad RA-params"
|
||||||
msgstr ""
|
msgstr "unzulässige RA-Parameter"
|
||||||
|
|
||||||
#: option.c:3313
|
#: option.c:3313
|
||||||
msgid "bad DUID"
|
msgid "bad DUID"
|
||||||
msgstr ""
|
msgstr "unzulässige DUID"
|
||||||
|
|
||||||
#: option.c:3355
|
#: option.c:3355
|
||||||
msgid "invalid alias range"
|
msgid "invalid alias range"
|
||||||
@@ -893,9 +918,8 @@ msgid "bad NAPTR record"
|
|||||||
msgstr "unzulässiger NAPTR-Eintrag"
|
msgstr "unzulässiger NAPTR-Eintrag"
|
||||||
|
|
||||||
#: option.c:3499
|
#: option.c:3499
|
||||||
#, fuzzy
|
|
||||||
msgid "bad RR record"
|
msgid "bad RR record"
|
||||||
msgstr "unzulässiger PTR-Eintrag"
|
msgstr "unzulässiger RR-Eintrag"
|
||||||
|
|
||||||
#: option.c:3528
|
#: option.c:3528
|
||||||
msgid "bad TXT record"
|
msgid "bad TXT record"
|
||||||
@@ -918,17 +942,20 @@ msgid "invalid weight"
|
|||||||
msgstr "unzulässige Wichtung"
|
msgstr "unzulässige Wichtung"
|
||||||
|
|
||||||
#: option.c:3621
|
#: option.c:3621
|
||||||
#, fuzzy
|
|
||||||
msgid "Bad host-record"
|
msgid "Bad host-record"
|
||||||
msgstr "unzulässiger PTR-Eintrag"
|
msgstr "unzulässiger host-record"
|
||||||
|
|
||||||
#: option.c:3638
|
#: option.c:3638
|
||||||
msgid "Bad name in host-record"
|
msgid "Bad name in host-record"
|
||||||
msgstr ""
|
msgstr "Unzulässiger Name in host-record"
|
||||||
|
|
||||||
#: option.c:3668
|
#: option.c:3668
|
||||||
msgid "unsupported option (check that dnsmasq was compiled with DHCP/TFTP/DBus support)"
|
msgid ""
|
||||||
msgstr "unzulässige Option (prüfen Sie, ob dnsmasq mit DHCP/TFTP/DBus-Unterstützt übersetzt wurde)"
|
"unsupported option (check that dnsmasq was compiled with DHCP/TFTP/DBus "
|
||||||
|
"support)"
|
||||||
|
msgstr ""
|
||||||
|
"unzulässige Option (prüfen Sie, ob dnsmasq mit DHCP/TFTP/DBus-Unterstützt "
|
||||||
|
"übersetzt wurde)"
|
||||||
|
|
||||||
#: option.c:3726
|
#: option.c:3726
|
||||||
msgid "missing \""
|
msgid "missing \""
|
||||||
@@ -951,9 +978,9 @@ msgid "error"
|
|||||||
msgstr "Fehler"
|
msgstr "Fehler"
|
||||||
|
|
||||||
#: option.c:3796
|
#: option.c:3796
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid " at line %d of %s"
|
msgid " at line %d of %s"
|
||||||
msgstr "%s in Zeile %d von %%s"
|
msgstr " in Zeile %d von %s"
|
||||||
|
|
||||||
#: option.c:3860 tftp.c:661
|
#: option.c:3860 tftp.c:661
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -992,12 +1019,14 @@ msgstr "Für diese Software wird ABSOLUT KEINE GARANTIE gewährt.\n"
|
|||||||
#: option.c:4157
|
#: option.c:4157
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Dnsmasq is free software, and you are welcome to redistribute it\n"
|
msgid "Dnsmasq is free software, and you are welcome to redistribute it\n"
|
||||||
msgstr "Dnsmasq ist freie Software, und du bist willkommen es weiter zu verteilen\n"
|
msgstr ""
|
||||||
|
"Dnsmasq ist freie Software, und du bist willkommen es weiter zu verteilen\n"
|
||||||
|
|
||||||
#: option.c:4158
|
#: option.c:4158
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "under the terms of the GNU General Public License, version 2 or 3.\n"
|
msgid "under the terms of the GNU General Public License, version 2 or 3.\n"
|
||||||
msgstr "unter den Bedingungen der GNU General Public Lizenz, Version 2 oder 3.\n"
|
msgstr ""
|
||||||
|
"unter den Bedingungen der GNU General Public Lizenz, Version 2 oder 3.\n"
|
||||||
|
|
||||||
#: option.c:4169
|
#: option.c:4169
|
||||||
msgid "try --help"
|
msgid "try --help"
|
||||||
@@ -1023,7 +1052,8 @@ msgstr "mit -n/--no-poll ist nur eine resolv.conf-Datei zulässig."
|
|||||||
|
|
||||||
#: option.c:4260
|
#: option.c:4260
|
||||||
msgid "must have exactly one resolv.conf to read domain from."
|
msgid "must have exactly one resolv.conf to read domain from."
|
||||||
msgstr "Um die Domäne zu lesen, muss genau eine resolv.conf-Datei verwendet werden."
|
msgstr ""
|
||||||
|
"Um die Domäne zu lesen, muss genau eine resolv.conf-Datei verwendet werden."
|
||||||
|
|
||||||
#: option.c:4263 network.c:1316 dhcp.c:768
|
#: option.c:4263 network.c:1316 dhcp.c:768
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1037,7 +1067,8 @@ msgstr "keine \"search\"-Anweisung in %s gefunden"
|
|||||||
|
|
||||||
#: option.c:4301
|
#: option.c:4301
|
||||||
msgid "there must be a default domain when --dhcp-fqdn is set"
|
msgid "there must be a default domain when --dhcp-fqdn is set"
|
||||||
msgstr "Es muss eine standard Domain gesetzt sein, wenn --dhcp-fqdn gesetzt ist"
|
msgstr ""
|
||||||
|
"Es muss eine standard Domain gesetzt sein, wenn --dhcp-fqdn gesetzt ist"
|
||||||
|
|
||||||
#: option.c:4305
|
#: option.c:4305
|
||||||
msgid "syntax check OK"
|
msgid "syntax check OK"
|
||||||
@@ -1050,7 +1081,7 @@ msgstr "Fehlgeschlagen, folgendes Paket zu senden: %s"
|
|||||||
|
|
||||||
#: forward.c:493
|
#: forward.c:493
|
||||||
msgid "discarding DNS reply: subnet option mismatch"
|
msgid "discarding DNS reply: subnet option mismatch"
|
||||||
msgstr ""
|
msgstr "Verwerfe DNS Antwort: Subnetoption stimmt nicht überrein"
|
||||||
|
|
||||||
#: forward.c:511
|
#: forward.c:511
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1063,9 +1094,9 @@ msgid "possible DNS-rebind attack detected: %s"
|
|||||||
msgstr "möglichen DNS-Rebind-Angriff entdeckt: %s"
|
msgstr "möglichen DNS-Rebind-Angriff entdeckt: %s"
|
||||||
|
|
||||||
#: forward.c:1284
|
#: forward.c:1284
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "Maximum number of concurrent DNS queries reached (max: %d)"
|
msgid "Maximum number of concurrent DNS queries reached (max: %d)"
|
||||||
msgstr "Höchstzahl nebenläufiger DNS-Anfragen (%s voreingestellt)."
|
msgstr "Maximale Anzahl an nebenläufiger DNS-Anfragen erreicht (Max: %d)"
|
||||||
|
|
||||||
#: network.c:627
|
#: network.c:627
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1074,22 +1105,30 @@ msgstr "Konnte Empfangs-Socket für %s: %s nicht erzeugen"
|
|||||||
|
|
||||||
#: network.c:947
|
#: network.c:947
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "LOUD WARNING: listening on %s may accept requests via interfaces other than %s"
|
msgid ""
|
||||||
|
"LOUD WARNING: listening on %s may accept requests via interfaces other than "
|
||||||
|
"%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"LOUD WARNING: Das Abhören von %s kann die Anfragen auf der Schnittstelle "
|
||||||
|
"akzeptieren anders als %s"
|
||||||
|
|
||||||
#: network.c:953
|
#: network.c:953
|
||||||
msgid "LOUD WARNING: use --bind-dynamic rather than --bind-interfaces to avoid DNS amplification attacks via these interface(s)"
|
msgid ""
|
||||||
|
"LOUD WARNING: use --bind-dynamic rather than --bind-interfaces to avoid DNS "
|
||||||
|
"amplification attacks via these interface(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"LOUD WARNING: Es sollte --bind-dynamic anstatt --bind-interfaces benutzt "
|
||||||
|
"werden, um DNS-Verstärkungsangriffe auf diesen Schnittstellen zu unterbinden"
|
||||||
|
|
||||||
#: network.c:962
|
#: network.c:962
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "warning: no addresses found for interface %s"
|
msgid "warning: no addresses found for interface %s"
|
||||||
msgstr "Benutze lokale Adressen nur für %s %s"
|
msgstr "Warnung: Keine Adresse für die Schnittstelle %s gefunden"
|
||||||
|
|
||||||
#: network.c:1020
|
#: network.c:1020
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "interface %s failed to join DHCPv6 multicast group: %s"
|
msgid "interface %s failed to join DHCPv6 multicast group: %s"
|
||||||
msgstr "Konnte DHCPv6-Multicast-Gruppe nicht beitreten: %s"
|
msgstr "Schnittstelle %s konnte DHCPv6-Multicast-Gruppe nicht beitreten: %s"
|
||||||
|
|
||||||
#: network.c:1214
|
#: network.c:1214
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1158,7 +1197,8 @@ msgstr "Kann nicht --conntrack UND --query-port einsetzen"
|
|||||||
|
|
||||||
#: dnsmasq.c:144
|
#: dnsmasq.c:144
|
||||||
msgid "Conntrack support not available: set HAVE_CONNTRACK in src/config.h"
|
msgid "Conntrack support not available: set HAVE_CONNTRACK in src/config.h"
|
||||||
msgstr "Conntrack-Unterstützung nicht verfügbar: setze HAVE_CONNTRACK in src/config.h"
|
msgstr ""
|
||||||
|
"Conntrack-Unterstützung nicht verfügbar: setze HAVE_CONNTRACK in src/config.h"
|
||||||
|
|
||||||
#: dnsmasq.c:149
|
#: dnsmasq.c:149
|
||||||
msgid "asychronous logging is not available under Solaris"
|
msgid "asychronous logging is not available under Solaris"
|
||||||
@@ -1169,21 +1209,22 @@ msgid "asychronous logging is not available under Android"
|
|||||||
msgstr "Asynchrone Protokollierung unter Android nicht verfügbar"
|
msgstr "Asynchrone Protokollierung unter Android nicht verfügbar"
|
||||||
|
|
||||||
#: dnsmasq.c:159
|
#: dnsmasq.c:159
|
||||||
#, fuzzy
|
|
||||||
msgid "authoritative DNS not available: set HAVE_AUTH in src/config.h"
|
msgid "authoritative DNS not available: set HAVE_AUTH in src/config.h"
|
||||||
msgstr "DBus nicht verfügbar: setzen Sie HAVE_DBUS in src/config.h"
|
msgstr ""
|
||||||
|
"Authoritatives DNS nicht verfügbar: Es muss HAVE_AUTH in src/config.h "
|
||||||
|
"gesetzt sein"
|
||||||
|
|
||||||
#: dnsmasq.c:169
|
#: dnsmasq.c:169
|
||||||
msgid "zone serial must be configured in --auth-soa"
|
msgid "zone serial must be configured in --auth-soa"
|
||||||
msgstr ""
|
msgstr "Zonen Seriennummer muss mit --auth-soa konfiguriert werden"
|
||||||
|
|
||||||
#: dnsmasq.c:187
|
#: dnsmasq.c:187
|
||||||
msgid "dhcp-range constructor not available on this platform"
|
msgid "dhcp-range constructor not available on this platform"
|
||||||
msgstr ""
|
msgstr "dhcp-range Konstruktor ist auf dieser Plattform nicht verfübar"
|
||||||
|
|
||||||
#: dnsmasq.c:227
|
#: dnsmasq.c:227
|
||||||
msgid "cannot set --bind-interfaces and --bind-dynamic"
|
msgid "cannot set --bind-interfaces and --bind-dynamic"
|
||||||
msgstr ""
|
msgstr "Kann nicht --bind-interfaces und --bind-dynamic setzen"
|
||||||
|
|
||||||
#: dnsmasq.c:231
|
#: dnsmasq.c:231
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1268,7 +1309,8 @@ msgstr "Warnung: keine vorgelagerten (Upstream) Server konfiguriert"
|
|||||||
#: dnsmasq.c:659
|
#: dnsmasq.c:659
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "asynchronous logging enabled, queue limit is %d messages"
|
msgid "asynchronous logging enabled, queue limit is %d messages"
|
||||||
msgstr "asynchrone Protokollierung eingeschaltet, Warteschlange fasst %d Nachrichten"
|
msgstr ""
|
||||||
|
"asynchrone Protokollierung eingeschaltet, Warteschlange fasst %d Nachrichten"
|
||||||
|
|
||||||
#: dnsmasq.c:680
|
#: dnsmasq.c:680
|
||||||
msgid "IPv6 router advertisement enabled"
|
msgid "IPv6 router advertisement enabled"
|
||||||
@@ -1277,7 +1319,7 @@ msgstr "IPv6-Router-Advertisement aktiviert"
|
|||||||
#: dnsmasq.c:685
|
#: dnsmasq.c:685
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "DHCP, sockets bound exclusively to interface %s"
|
msgid "DHCP, sockets bound exclusively to interface %s"
|
||||||
msgstr ""
|
msgstr "DHCP, Sockets exklusiv an das Interface %s gebunden"
|
||||||
|
|
||||||
# FIXME: this and the next few must be full strings to be translatable - do not assemble in code"
|
# FIXME: this and the next few must be full strings to be translatable - do not assemble in code"
|
||||||
#: dnsmasq.c:702
|
#: dnsmasq.c:702
|
||||||
@@ -1344,7 +1386,7 @@ msgstr "Konnte Lua-Script nicht laden: %s"
|
|||||||
#: dnsmasq.c:1068
|
#: dnsmasq.c:1068
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "TFTP directory %s inaccessible: %s"
|
msgid "TFTP directory %s inaccessible: %s"
|
||||||
msgstr ""
|
msgstr "Das TFTP-Verzeichnis %s ist nicht zugreifbar: %s"
|
||||||
|
|
||||||
#: dnsmasq.c:1132
|
#: dnsmasq.c:1132
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1433,7 +1475,7 @@ msgstr "ignoriere %s Zeile %d, doppelter Name oder doppelte IP-Adresse"
|
|||||||
#: dhcp.c:993 rfc3315.c:2063
|
#: dhcp.c:993 rfc3315.c:2063
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "DHCP relay %s -> %s"
|
msgid "DHCP relay %s -> %s"
|
||||||
msgstr ""
|
msgstr "DHCP Weiterleitung %s -> %s"
|
||||||
|
|
||||||
#: lease.c:61
|
#: lease.c:61
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1556,8 +1598,11 @@ msgstr "benutze konfigurierte Adresse %s nicht, weil sie an %s verleast ist"
|
|||||||
|
|
||||||
#: rfc2131.c:994
|
#: rfc2131.c:994
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "not using configured address %s because it is in use by the server or relay"
|
msgid ""
|
||||||
msgstr "benutze konfigurierte Adresse %s nicht, weil sie von Server/Relais verwendet wird"
|
"not using configured address %s because it is in use by the server or relay"
|
||||||
|
msgstr ""
|
||||||
|
"benutze konfigurierte Adresse %s nicht, weil sie von Server/Relais verwendet "
|
||||||
|
"wird"
|
||||||
|
|
||||||
#: rfc2131.c:997
|
#: rfc2131.c:997
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1635,7 +1680,8 @@ msgstr "%u angeforderte Optionen: %s"
|
|||||||
#: rfc2131.c:2447
|
#: rfc2131.c:2447
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot send RFC3925 option: too many options for enterprise number %d"
|
msgid "cannot send RFC3925 option: too many options for enterprise number %d"
|
||||||
msgstr "Kann RFC3925-Option nicht senden: zu viele Optionen für Unternehmen Nr. %d"
|
msgstr ""
|
||||||
|
"Kann RFC3925-Option nicht senden: zu viele Optionen für Unternehmen Nr. %d"
|
||||||
|
|
||||||
#: netlink.c:78
|
#: netlink.c:78
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1649,7 +1695,8 @@ msgstr "Netlink liefert Fehler %s"
|
|||||||
|
|
||||||
#: dbus.c:259
|
#: dbus.c:259
|
||||||
msgid "attempt to set an IPv6 server address via DBus - no IPv6 support"
|
msgid "attempt to set an IPv6 server address via DBus - no IPv6 support"
|
||||||
msgstr "Versuch, via DBus eine IPv6-Serveradresse zu setzen: keine IPv6-Unterstützung"
|
msgstr ""
|
||||||
|
"Versuch, via DBus eine IPv6-Serveradresse zu setzen: keine IPv6-Unterstützung"
|
||||||
|
|
||||||
#: dbus.c:523
|
#: dbus.c:523
|
||||||
msgid "setting upstream servers from DBus"
|
msgid "setting upstream servers from DBus"
|
||||||
@@ -1727,9 +1774,9 @@ msgid "cannot create DHCPv6 socket: %s"
|
|||||||
msgstr "Kann DHCPv6-Socket nicht erzeugen: %s"
|
msgstr "Kann DHCPv6-Socket nicht erzeugen: %s"
|
||||||
|
|
||||||
#: dhcp6.c:80
|
#: dhcp6.c:80
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCPv6 socket: %s"
|
msgid "failed to set SO_REUSE{ADDR|PORT} on DHCPv6 socket: %s"
|
||||||
msgstr "kann SO_REUSE{ADDR|PORT} für DHCP-Socket nicht aktivieren: %s"
|
msgstr "kann SO_REUSE{ADDR|PORT} für DHCPv6-Socket nicht aktivieren: %s"
|
||||||
|
|
||||||
#: dhcp6.c:92
|
#: dhcp6.c:92
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1752,68 +1799,64 @@ msgid "%u available DHCPv6 subnet: %s/%d"
|
|||||||
msgstr "%u verfügbare(s) DHCPv6-Subnetz: %s/%d"
|
msgstr "%u verfügbare(s) DHCPv6-Subnetz: %s/%d"
|
||||||
|
|
||||||
#: rfc3315.c:376
|
#: rfc3315.c:376
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "%u vendor class: %u"
|
msgid "%u vendor class: %u"
|
||||||
msgstr "%u \"Vendor class\": %s"
|
msgstr "%u Herstellerklasse: %u"
|
||||||
|
|
||||||
#: rfc3315.c:424
|
#: rfc3315.c:424
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "%u client MAC address: %s"
|
msgid "%u client MAC address: %s"
|
||||||
msgstr "%u Klient stellt Name bereit: %s"
|
msgstr "%u Klient MAC-Adresse: %s"
|
||||||
|
|
||||||
# FIXME: do not assemble
|
# FIXME: do not assemble
|
||||||
#: rfc3315.c:656
|
#: rfc3315.c:656
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "unknown prefix-class %d"
|
msgid "unknown prefix-class %d"
|
||||||
msgstr "Unbekannter Lease"
|
msgstr "unbekannte Präfixklasse %d"
|
||||||
|
|
||||||
#: rfc3315.c:788 rfc3315.c:910
|
#: rfc3315.c:788 rfc3315.c:910
|
||||||
msgid "success"
|
msgid "success"
|
||||||
msgstr ""
|
msgstr "Erfolg"
|
||||||
|
|
||||||
#: rfc3315.c:803 rfc3315.c:805 rfc3315.c:918 rfc3315.c:920
|
#: rfc3315.c:803 rfc3315.c:805 rfc3315.c:918 rfc3315.c:920
|
||||||
#, fuzzy
|
|
||||||
msgid "no addresses available"
|
msgid "no addresses available"
|
||||||
msgstr "Keine Adresse verfügbar"
|
msgstr "Keine Adressen verfügbar"
|
||||||
|
|
||||||
#: rfc3315.c:862
|
#: rfc3315.c:862
|
||||||
#, fuzzy
|
|
||||||
msgid "address unavailable"
|
msgid "address unavailable"
|
||||||
msgstr "Adresse nicht verfügbar"
|
msgstr "Adresse nicht verfügbar"
|
||||||
|
|
||||||
#: rfc3315.c:897
|
#: rfc3315.c:897
|
||||||
msgid "not on link"
|
msgid "not on link"
|
||||||
msgstr ""
|
msgstr "nicht on link"
|
||||||
|
|
||||||
#: rfc3315.c:970 rfc3315.c:1148 rfc3315.c:1225
|
#: rfc3315.c:970 rfc3315.c:1148 rfc3315.c:1225
|
||||||
msgid "no binding found"
|
msgid "no binding found"
|
||||||
msgstr ""
|
msgstr "Keine Bindung gefunden"
|
||||||
|
|
||||||
#: rfc3315.c:1008
|
#: rfc3315.c:1008
|
||||||
msgid "deprecated"
|
msgid "deprecated"
|
||||||
msgstr ""
|
msgstr "veraltet"
|
||||||
|
|
||||||
#: rfc3315.c:1013
|
#: rfc3315.c:1013
|
||||||
#, fuzzy
|
|
||||||
msgid "address invalid"
|
msgid "address invalid"
|
||||||
msgstr "Adresse in Nutzung"
|
msgstr "Adresse ungültig"
|
||||||
|
|
||||||
#: rfc3315.c:1058
|
#: rfc3315.c:1058
|
||||||
msgid "confirm failed"
|
msgid "confirm failed"
|
||||||
msgstr ""
|
msgstr "Bestätigung fehlgeschlagen"
|
||||||
|
|
||||||
#: rfc3315.c:1069
|
#: rfc3315.c:1069
|
||||||
#, fuzzy
|
|
||||||
msgid "all addresses still on link"
|
msgid "all addresses still on link"
|
||||||
msgstr "Fehlerhafte Adresse in %s Zeile %d"
|
msgstr "Alle Adressen immer noch on link"
|
||||||
|
|
||||||
#: rfc3315.c:1157
|
#: rfc3315.c:1157
|
||||||
msgid "release received"
|
msgid "release received"
|
||||||
msgstr ""
|
msgstr "Freigabe empfangen"
|
||||||
|
|
||||||
#: rfc3315.c:2054
|
#: rfc3315.c:2054
|
||||||
msgid "Cannot multicast to DHCPv6 server without correct interface"
|
msgid "Cannot multicast to DHCPv6 server without correct interface"
|
||||||
msgstr ""
|
msgstr "Kann nicht zum DHCPv6 Server multicasten ohne korrekte Schnittstelle"
|
||||||
|
|
||||||
#: dhcp-common.c:145
|
#: dhcp-common.c:145
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1836,9 +1879,9 @@ msgid "duplicate IP address %s (%s) in dhcp-config directive"
|
|||||||
msgstr "doppelte IP-Adresse %s (%s) in \"dhcp-config\"-Anweisung"
|
msgstr "doppelte IP-Adresse %s (%s) in \"dhcp-config\"-Anweisung"
|
||||||
|
|
||||||
#: dhcp-common.c:494
|
#: dhcp-common.c:494
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "failed to set SO_BINDTODEVICE on DHCP socket: %s"
|
msgid "failed to set SO_BINDTODEVICE on DHCP socket: %s"
|
||||||
msgstr "kann SO_REUSE{ADDR|PORT} für DHCP-Socket nicht aktivieren: %s"
|
msgstr "kann SO_BINDTODEVICE für DHCP-Socket nicht aktivieren: %s"
|
||||||
|
|
||||||
#: dhcp-common.c:615
|
#: dhcp-common.c:615
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1852,52 +1895,52 @@ msgstr "Bekannte DHCPv6-Optionen:\n"
|
|||||||
|
|
||||||
#: dhcp-common.c:823
|
#: dhcp-common.c:823
|
||||||
msgid ", prefix deprecated"
|
msgid ", prefix deprecated"
|
||||||
msgstr ""
|
msgstr ", Prefix veraltet"
|
||||||
|
|
||||||
#: dhcp-common.c:826
|
#: dhcp-common.c:826
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ", lease time "
|
msgid ", lease time "
|
||||||
msgstr ""
|
msgstr ", Lease Zeit"
|
||||||
|
|
||||||
#: dhcp-common.c:868
|
#: dhcp-common.c:868
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s stateless on %s%.0s%.0s%s"
|
msgid "%s stateless on %s%.0s%.0s%s"
|
||||||
msgstr ""
|
msgstr "%s stateless auf %s%.0s%.0s%s"
|
||||||
|
|
||||||
#: dhcp-common.c:870
|
#: dhcp-common.c:870
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "%s, static leases only on %.0s%s%s%.0s"
|
msgid "%s, static leases only on %.0s%s%s%.0s"
|
||||||
msgstr "DHCP, nur statische Leases auf %.0s%s, Lease-Zeit %s"
|
msgstr "%s, nur statische Leases auf %.0s%s%s%.0s"
|
||||||
|
|
||||||
#: dhcp-common.c:872
|
#: dhcp-common.c:872
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "%s, proxy on subnet %.0s%s%.0s%.0s"
|
msgid "%s, proxy on subnet %.0s%s%.0s%.0s"
|
||||||
msgstr "DHCP, Proxy im Subnetz %.0s%s%.0s"
|
msgstr "%s, Proxy im Subnetz %.0s%s%.0s%.0s"
|
||||||
|
|
||||||
#: dhcp-common.c:873
|
#: dhcp-common.c:873
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "%s, IP range %s -- %s%s%.0s"
|
msgid "%s, IP range %s -- %s%s%.0s"
|
||||||
msgstr "DHCP, IP-Bereich %s - %s, Lease-Zeit %s "
|
msgstr "%s, IP-Bereich %s -- %s%s%.0s"
|
||||||
|
|
||||||
#: dhcp-common.c:886
|
#: dhcp-common.c:886
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "DHCPv4-derived IPv6 names on %s%s"
|
msgid "DHCPv4-derived IPv6 names on %s%s"
|
||||||
msgstr ""
|
msgstr "DHCPv4-abgeleitete IPv6 Namen auf %s%s"
|
||||||
|
|
||||||
#: dhcp-common.c:889
|
#: dhcp-common.c:889
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "router advertisement on %s%s"
|
msgid "router advertisement on %s%s"
|
||||||
msgstr "Router-Advertisment nur auf %.0s%s, Lebenszeit %s"
|
msgstr "Router-Advertisment auf %s%s"
|
||||||
|
|
||||||
#: dhcp-common.c:900
|
#: dhcp-common.c:900
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "DHCP relay from %s to %s via %s"
|
msgid "DHCP relay from %s to %s via %s"
|
||||||
msgstr ""
|
msgstr "DHCP Weiterleitung von %s nach %s über %s"
|
||||||
|
|
||||||
#: dhcp-common.c:902
|
#: dhcp-common.c:902
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "DHCP relay from %s to %s"
|
msgid "DHCP relay from %s to %s"
|
||||||
msgstr ""
|
msgstr "DHCP Weiterleitung von %s nach %s"
|
||||||
|
|
||||||
#: radv.c:98
|
#: radv.c:98
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1905,19 +1948,19 @@ msgid "cannot create ICMPv6 socket: %s"
|
|||||||
msgstr "Kann ICMPv6-Socket nicht erzeugen: %s"
|
msgstr "Kann ICMPv6-Socket nicht erzeugen: %s"
|
||||||
|
|
||||||
#: auth.c:427
|
#: auth.c:427
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "ignoring zone transfer request from %s"
|
msgid "ignoring zone transfer request from %s"
|
||||||
msgstr "nicht unterstützte Anfrage von %s"
|
msgstr "ignoriere Zonentransfer-Anfrage von %s"
|
||||||
|
|
||||||
#: ipset.c:95
|
#: ipset.c:95
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "failed to find kernel version: %s"
|
msgid "failed to find kernel version: %s"
|
||||||
msgstr "kann nicht an DHCP-Server-Socket binden: %s"
|
msgstr "konnte Kernelversion nicht finden: %s"
|
||||||
|
|
||||||
#: ipset.c:114
|
#: ipset.c:114
|
||||||
#, fuzzy, c-format
|
#, c-format
|
||||||
msgid "failed to create IPset control socket: %s"
|
msgid "failed to create IPset control socket: %s"
|
||||||
msgstr "konnte TFTP-Socket nicht erzeugen: %s"
|
msgstr "konnte IPset-Kontroll-Socket nicht erzeugen: %s"
|
||||||
|
|
||||||
#~ msgid "no interface with address %s"
|
#~ msgid "no interface with address %s"
|
||||||
#~ msgstr "keine Schnittstelle mit Adresse %s"
|
#~ msgstr "keine Schnittstelle mit Adresse %s"
|
||||||
|
|||||||
+9
-4
@@ -25,7 +25,7 @@ static void blockdata_expand(int n)
|
|||||||
{
|
{
|
||||||
struct blockdata *new = whine_malloc(n * sizeof(struct blockdata));
|
struct blockdata *new = whine_malloc(n * sizeof(struct blockdata));
|
||||||
|
|
||||||
if (new)
|
if (n > 0 && new)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -47,13 +47,18 @@ void blockdata_init(void)
|
|||||||
blockdata_count = 0;
|
blockdata_count = 0;
|
||||||
blockdata_hwm = 0;
|
blockdata_hwm = 0;
|
||||||
|
|
||||||
blockdata_expand((daemon->cachesize * 100) / sizeof(struct blockdata));
|
/* Note that daemon->cachesize is enforced to have non-zero size if OPT_DNSSEC_VALID is set */
|
||||||
|
if (option_bool(OPT_DNSSEC_VALID))
|
||||||
|
blockdata_expand((daemon->cachesize * 100) / sizeof(struct blockdata));
|
||||||
}
|
}
|
||||||
|
|
||||||
void blockdata_report(void)
|
void blockdata_report(void)
|
||||||
{
|
{
|
||||||
my_syslog(LOG_INFO, _("DNSSEC memory in use %u, max %u, allocated %u"),
|
if (option_bool(OPT_DNSSEC_VALID))
|
||||||
blockdata_count * sizeof(struct blockdata), blockdata_hwm * sizeof(struct blockdata), blockdata_alloced * sizeof(struct blockdata));
|
my_syslog(LOG_INFO, _("DNSSEC memory in use %u, max %u, allocated %u"),
|
||||||
|
blockdata_count * sizeof(struct blockdata),
|
||||||
|
blockdata_hwm * sizeof(struct blockdata),
|
||||||
|
blockdata_alloced * sizeof(struct blockdata));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct blockdata *blockdata_alloc(char *data, size_t len)
|
struct blockdata *blockdata_alloc(char *data, size_t len)
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ void route_init(void)
|
|||||||
die(_("cannot create PF_ROUTE socket: %s"), NULL, EC_BADNET);
|
die(_("cannot create PF_ROUTE socket: %s"), NULL, EC_BADNET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void route_sock(time_t now)
|
void route_sock(void)
|
||||||
{
|
{
|
||||||
struct if_msghdr *msg;
|
struct if_msghdr *msg;
|
||||||
int rc = recv(daemon->routefd, daemon->packet, daemon->packet_buff_sz, 0);
|
int rc = recv(daemon->routefd, daemon->packet, daemon->packet_buff_sz, 0);
|
||||||
@@ -401,7 +401,7 @@ void route_sock(time_t now)
|
|||||||
else if (msg->ifm_type == RTM_NEWADDR)
|
else if (msg->ifm_type == RTM_NEWADDR)
|
||||||
{
|
{
|
||||||
del_family = 0;
|
del_family = 0;
|
||||||
newaddress(now);
|
queue_event(EVENT_NEWADDR);
|
||||||
}
|
}
|
||||||
else if (msg->ifm_type == RTM_DELADDR)
|
else if (msg->ifm_type == RTM_DELADDR)
|
||||||
{
|
{
|
||||||
@@ -439,7 +439,7 @@ void route_sock(time_t now)
|
|||||||
of += sizeof(long) - (diff & (sizeof(long) - 1));
|
of += sizeof(long) - (diff & (sizeof(long) - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
newaddress(now);
|
queue_event(EVENT_NEWADDR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+25
-2
@@ -47,6 +47,8 @@
|
|||||||
#define SOA_REFRESH 1200 /* SOA refresh default */
|
#define SOA_REFRESH 1200 /* SOA refresh default */
|
||||||
#define SOA_RETRY 180 /* SOA retry default */
|
#define SOA_RETRY 180 /* SOA retry default */
|
||||||
#define SOA_EXPIRY 1209600 /* SOA expiry default */
|
#define SOA_EXPIRY 1209600 /* SOA expiry default */
|
||||||
|
#define LOOP_TEST_DOMAIN "test" /* domain for loop testing, "test" is reserved by RFC 2606 and won't therefore clash */
|
||||||
|
#define LOOP_TEST_TYPE T_TXT
|
||||||
|
|
||||||
/* compile-time options: uncomment below to enable or do eg.
|
/* compile-time options: uncomment below to enable or do eg.
|
||||||
make COPTS=-DHAVE_BROKEN_RTC
|
make COPTS=-DHAVE_BROKEN_RTC
|
||||||
@@ -105,6 +107,12 @@ HAVE_AUTH
|
|||||||
define this to include the facility to act as an authoritative DNS
|
define this to include the facility to act as an authoritative DNS
|
||||||
server for one or more zones.
|
server for one or more zones.
|
||||||
|
|
||||||
|
HAVE_DNSSEC
|
||||||
|
include DNSSEC validator.
|
||||||
|
|
||||||
|
HAVE_LOOP
|
||||||
|
include functionality to probe for and remove DNS forwarding loops.
|
||||||
|
|
||||||
|
|
||||||
NO_IPV6
|
NO_IPV6
|
||||||
NO_TFTP
|
NO_TFTP
|
||||||
@@ -118,6 +126,11 @@ NO_AUTH
|
|||||||
which are enabled by default in the distributed source tree. Building dnsmasq
|
which are enabled by default in the distributed source tree. Building dnsmasq
|
||||||
with something like "make COPTS=-DNO_SCRIPT" will do the trick.
|
with something like "make COPTS=-DNO_SCRIPT" will do the trick.
|
||||||
|
|
||||||
|
NO_NETTLE_ECC
|
||||||
|
Don't include the ECDSA cypher in DNSSEC validation. Needed for older Nettle versions.
|
||||||
|
NO_GMP
|
||||||
|
Don't use and link against libgmp, Useful if nettle is built with --enable-mini-gmp.
|
||||||
|
|
||||||
LEASEFILE
|
LEASEFILE
|
||||||
CONFFILE
|
CONFFILE
|
||||||
RESOLVFILE
|
RESOLVFILE
|
||||||
@@ -141,6 +154,7 @@ RESOLVFILE
|
|||||||
#define HAVE_SCRIPT
|
#define HAVE_SCRIPT
|
||||||
#define HAVE_AUTH
|
#define HAVE_AUTH
|
||||||
#define HAVE_IPSET
|
#define HAVE_IPSET
|
||||||
|
#define HAVE_LOOP
|
||||||
|
|
||||||
/* Build options which require external libraries.
|
/* Build options which require external libraries.
|
||||||
|
|
||||||
@@ -261,6 +275,7 @@ HAVE_SOCKADDR_SA_LEN
|
|||||||
/* Select the RFC_3542 version of the IPv6 socket API.
|
/* Select the RFC_3542 version of the IPv6 socket API.
|
||||||
Define before netinet6/in6.h is included. */
|
Define before netinet6/in6.h is included. */
|
||||||
#define __APPLE_USE_RFC_3542
|
#define __APPLE_USE_RFC_3542
|
||||||
|
#define NO_IPSET
|
||||||
|
|
||||||
#elif defined(__NetBSD__)
|
#elif defined(__NetBSD__)
|
||||||
#define HAVE_BSD_NETWORK
|
#define HAVE_BSD_NETWORK
|
||||||
@@ -330,10 +345,14 @@ HAVE_SOCKADDR_SA_LEN
|
|||||||
#undef HAVE_AUTH
|
#undef HAVE_AUTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NO_IPSET) || !defined(HAVE_LINUX_NETWORK)
|
#if defined(NO_IPSET)
|
||||||
#undef HAVE_IPSET
|
#undef HAVE_IPSET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_LOOP
|
||||||
|
#undef HAVE_LOOP
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define a string indicating which options are in use.
|
/* Define a string indicating which options are in use.
|
||||||
DNSMASQP_COMPILE_OPTS is only defined in dnsmasq.c */
|
DNSMASQP_COMPILE_OPTS is only defined in dnsmasq.c */
|
||||||
|
|
||||||
@@ -403,7 +422,11 @@ static char *compile_opts =
|
|||||||
#ifndef HAVE_DNSSEC
|
#ifndef HAVE_DNSSEC
|
||||||
"no-"
|
"no-"
|
||||||
#endif
|
#endif
|
||||||
"DNSSEC";
|
"DNSSEC "
|
||||||
|
#ifndef HAVE_LOOP
|
||||||
|
"no-"
|
||||||
|
#endif
|
||||||
|
"loop-detect";
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+78
-3
@@ -35,6 +35,11 @@ const char* introspection_xml_template =
|
|||||||
" <method name=\"GetVersion\">\n"
|
" <method name=\"GetVersion\">\n"
|
||||||
" <arg name=\"version\" direction=\"out\" type=\"s\"/>\n"
|
" <arg name=\"version\" direction=\"out\" type=\"s\"/>\n"
|
||||||
" </method>\n"
|
" </method>\n"
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
" <method name=\"GetLoopServers\">\n"
|
||||||
|
" <arg name=\"server\" direction=\"out\" type=\"as\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
#endif
|
||||||
" <method name=\"SetServers\">\n"
|
" <method name=\"SetServers\">\n"
|
||||||
" <arg name=\"servers\" direction=\"in\" type=\"av\"/>\n"
|
" <arg name=\"servers\" direction=\"in\" type=\"av\"/>\n"
|
||||||
" </method>\n"
|
" </method>\n"
|
||||||
@@ -44,6 +49,12 @@ const char* introspection_xml_template =
|
|||||||
" <method name=\"SetServersEx\">\n"
|
" <method name=\"SetServersEx\">\n"
|
||||||
" <arg name=\"servers\" direction=\"in\" type=\"aas\"/>\n"
|
" <arg name=\"servers\" direction=\"in\" type=\"aas\"/>\n"
|
||||||
" </method>\n"
|
" </method>\n"
|
||||||
|
" <method name=\"SetFilterWin2KOption\">\n"
|
||||||
|
" <arg name=\"filterwin2k\" direction=\"in\" type=\"b\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"SetBogusPrivOption\">\n"
|
||||||
|
" <arg name=\"boguspriv\" direction=\"in\" type=\"b\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
" <signal name=\"DhcpLeaseAdded\">\n"
|
" <signal name=\"DhcpLeaseAdded\">\n"
|
||||||
" <arg name=\"ipaddr\" type=\"s\"/>\n"
|
" <arg name=\"ipaddr\" type=\"s\"/>\n"
|
||||||
" <arg name=\"hwaddr\" type=\"s\"/>\n"
|
" <arg name=\"hwaddr\" type=\"s\"/>\n"
|
||||||
@@ -150,13 +161,16 @@ static void dbus_read_servers(DBusMessage *message)
|
|||||||
dbus_message_iter_get_basic(&iter, &p[i]);
|
dbus_message_iter_get_basic(&iter, &p[i]);
|
||||||
dbus_message_iter_next (&iter);
|
dbus_message_iter_next (&iter);
|
||||||
if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BYTE)
|
if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BYTE)
|
||||||
break;
|
{
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_IPV6
|
#ifndef HAVE_IPV6
|
||||||
my_syslog(LOG_WARNING, _("attempt to set an IPv6 server address via DBus - no IPv6 support"));
|
my_syslog(LOG_WARNING, _("attempt to set an IPv6 server address via DBus - no IPv6 support"));
|
||||||
#else
|
#else
|
||||||
if (i == sizeof(struct in6_addr)-1)
|
if (i == sizeof(struct in6_addr))
|
||||||
{
|
{
|
||||||
memcpy(&addr.in6.sin6_addr, p, sizeof(struct in6_addr));
|
memcpy(&addr.in6.sin6_addr, p, sizeof(struct in6_addr));
|
||||||
#ifdef HAVE_SOCKADDR_SA_LEN
|
#ifdef HAVE_SOCKADDR_SA_LEN
|
||||||
@@ -196,6 +210,29 @@ static void dbus_read_servers(DBusMessage *message)
|
|||||||
cleanup_servers();
|
cleanup_servers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
static DBusMessage *dbus_reply_server_loop(DBusMessage *message)
|
||||||
|
{
|
||||||
|
DBusMessageIter args, args_iter;
|
||||||
|
struct server *serv;
|
||||||
|
DBusMessage *reply = dbus_message_new_method_return(message);
|
||||||
|
|
||||||
|
dbus_message_iter_init_append (reply, &args);
|
||||||
|
dbus_message_iter_open_container (&args, DBUS_TYPE_ARRAY,DBUS_TYPE_STRING_AS_STRING, &args_iter);
|
||||||
|
|
||||||
|
for (serv = daemon->servers; serv; serv = serv->next)
|
||||||
|
if (serv->flags & SERV_LOOP)
|
||||||
|
{
|
||||||
|
prettyprint_addr(&serv->addr, daemon->addrbuff);
|
||||||
|
dbus_message_iter_append_basic (&args_iter, DBUS_TYPE_STRING, &daemon->addrbuff);
|
||||||
|
}
|
||||||
|
|
||||||
|
dbus_message_iter_close_container (&args, &args_iter);
|
||||||
|
|
||||||
|
return reply;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static DBusMessage* dbus_read_servers_ex(DBusMessage *message, int strings)
|
static DBusMessage* dbus_read_servers_ex(DBusMessage *message, int strings)
|
||||||
{
|
{
|
||||||
DBusMessageIter iter, array_iter, string_iter;
|
DBusMessageIter iter, array_iter, string_iter;
|
||||||
@@ -372,6 +409,30 @@ static DBusMessage* dbus_read_servers_ex(DBusMessage *message, int strings)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DBusMessage *dbus_set_bool(DBusMessage *message, int flag, char *name)
|
||||||
|
{
|
||||||
|
DBusMessageIter iter;
|
||||||
|
dbus_bool_t enabled;
|
||||||
|
|
||||||
|
if (!dbus_message_iter_init(message, &iter) || dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN)
|
||||||
|
return dbus_message_new_error(message, DBUS_ERROR_INVALID_ARGS, "Expected boolean argument");
|
||||||
|
|
||||||
|
dbus_message_iter_get_basic(&iter, &enabled);
|
||||||
|
|
||||||
|
if (enabled)
|
||||||
|
{
|
||||||
|
my_syslog(LOG_INFO, "Enabling --%s option from D-Bus", name);
|
||||||
|
set_option_bool(flag);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
my_syslog(LOG_INFO, "Disabling --$s option from D-Bus", name);
|
||||||
|
reset_option_bool(flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
DBusHandlerResult message_handler(DBusConnection *connection,
|
DBusHandlerResult message_handler(DBusConnection *connection,
|
||||||
DBusMessage *message,
|
DBusMessage *message,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
@@ -400,6 +461,12 @@ DBusHandlerResult message_handler(DBusConnection *connection,
|
|||||||
|
|
||||||
dbus_message_append_args(reply, DBUS_TYPE_STRING, &v, DBUS_TYPE_INVALID);
|
dbus_message_append_args(reply, DBUS_TYPE_STRING, &v, DBUS_TYPE_INVALID);
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
else if (strcmp(method, "GetLoopServers") == 0)
|
||||||
|
{
|
||||||
|
reply = dbus_reply_server_loop(message);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(method, "SetServers") == 0)
|
else if (strcmp(method, "SetServers") == 0)
|
||||||
{
|
{
|
||||||
dbus_read_servers(message);
|
dbus_read_servers(message);
|
||||||
@@ -415,6 +482,14 @@ DBusHandlerResult message_handler(DBusConnection *connection,
|
|||||||
reply = dbus_read_servers_ex(message, 1);
|
reply = dbus_read_servers_ex(message, 1);
|
||||||
new_servers = 1;
|
new_servers = 1;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(method, "SetFilterWin2KOption") == 0)
|
||||||
|
{
|
||||||
|
reply = dbus_set_bool(message, OPT_FILTER, "filterwin2k");
|
||||||
|
}
|
||||||
|
else if (strcmp(method, "SetBogusPrivOption") == 0)
|
||||||
|
{
|
||||||
|
reply = dbus_set_bool(message, OPT_BOGUSPRIV, "bogus-priv");
|
||||||
|
}
|
||||||
else if (strcmp(method, "ClearCache") == 0)
|
else if (strcmp(method, "ClearCache") == 0)
|
||||||
clear_cache = 1;
|
clear_cache = 1;
|
||||||
else
|
else
|
||||||
@@ -558,7 +633,7 @@ void emit_dbus_signal(int action, struct dhcp_lease *lease, char *hostname)
|
|||||||
if (lease->flags & (LEASE_TA | LEASE_NA))
|
if (lease->flags & (LEASE_TA | LEASE_NA))
|
||||||
{
|
{
|
||||||
print_mac(mac, lease->clid, lease->clid_len);
|
print_mac(mac, lease->clid, lease->clid_len);
|
||||||
inet_ntop(AF_INET6, lease->hwaddr, daemon->addrbuff, ADDRSTRLEN);
|
inet_ntop(AF_INET6, &lease->addr6, daemon->addrbuff, ADDRSTRLEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+3
-2
@@ -232,7 +232,7 @@ void dhcp_packet(time_t now, int pxe_fd)
|
|||||||
for (bridge = daemon->bridges; bridge; bridge = bridge->next)
|
for (bridge = daemon->bridges; bridge; bridge = bridge->next)
|
||||||
{
|
{
|
||||||
for (alias = bridge->alias; alias; alias = alias->next)
|
for (alias = bridge->alias; alias; alias = alias->next)
|
||||||
if (strncmp(ifr.ifr_name, alias->iface, IF_NAMESIZE) == 0)
|
if (wildcard_matchn(alias->iface, ifr.ifr_name, IF_NAMESIZE))
|
||||||
{
|
{
|
||||||
if (!(iface_index = if_nametoindex(bridge->iface)))
|
if (!(iface_index = if_nametoindex(bridge->iface)))
|
||||||
{
|
{
|
||||||
@@ -404,7 +404,8 @@ void dhcp_packet(time_t now, int pxe_fd)
|
|||||||
memcpy(arp_req.arp_ha.sa_data, mess->chaddr, mess->hlen);
|
memcpy(arp_req.arp_ha.sa_data, mess->chaddr, mess->hlen);
|
||||||
/* interface name already copied in */
|
/* interface name already copied in */
|
||||||
arp_req.arp_flags = ATF_COM;
|
arp_req.arp_flags = ATF_COM;
|
||||||
ioctl(daemon->dhcpfd, SIOCSARP, &arp_req);
|
if (ioctl(daemon->dhcpfd, SIOCSARP, &arp_req) == -1)
|
||||||
|
my_syslog(MS_DHCP | LOG_ERR, _("ARP-cache injection failed: %s"), strerror(errno));
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_SOLARIS_NETWORK)
|
#elif defined(HAVE_SOLARIS_NETWORK)
|
||||||
else if ((ntohs(mess->flags) & 0x8000) || mess->hlen != ETHER_ADDR_LEN || mess->htype != ARPHRD_ETHER)
|
else if ((ntohs(mess->flags) & 0x8000) || mess->hlen != ETHER_ADDR_LEN || mess->htype != ARPHRD_ETHER)
|
||||||
|
|||||||
+1
-2
@@ -727,8 +727,7 @@ void dhcp_construct_contexts(time_t now)
|
|||||||
|
|
||||||
if (context->flags & CONTEXT_GC && !(context->flags & CONTEXT_OLD))
|
if (context->flags & CONTEXT_GC && !(context->flags & CONTEXT_OLD))
|
||||||
{
|
{
|
||||||
if ((context->flags & (CONTEXT_RA_ONLY | CONTEXT_RA_NAME | CONTEXT_RA_STATELESS)) ||
|
if ((context->flags & CONTEXT_RA) || option_bool(OPT_RA))
|
||||||
option_bool(OPT_RA))
|
|
||||||
{
|
{
|
||||||
/* previously constructed context has gone. advertise it's demise */
|
/* previously constructed context has gone. advertise it's demise */
|
||||||
context->flags |= CONTEXT_OLD;
|
context->flags |= CONTEXT_OLD;
|
||||||
|
|||||||
+25
-4
@@ -30,6 +30,7 @@ static void sig_handler(int sig);
|
|||||||
static void async_event(int pipe, time_t now);
|
static void async_event(int pipe, time_t now);
|
||||||
static void fatal_event(struct event_desc *ev, char *msg);
|
static void fatal_event(struct event_desc *ev, char *msg);
|
||||||
static int read_event(int fd, struct event_desc *evp, char **msg);
|
static int read_event(int fd, struct event_desc *evp, char **msg);
|
||||||
|
static void poll_resolv(int force, int do_reload, time_t now);
|
||||||
|
|
||||||
int main (int argc, char **argv)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -80,6 +81,8 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
umask(022); /* known umask, create leases and pid files as 0644 */
|
umask(022); /* known umask, create leases and pid files as 0644 */
|
||||||
|
|
||||||
|
rand_init(); /* Must precede read_opts() */
|
||||||
|
|
||||||
read_opts(argc, argv, compile_opts);
|
read_opts(argc, argv, compile_opts);
|
||||||
|
|
||||||
if (daemon->edns_pktsz < PACKETSZ)
|
if (daemon->edns_pktsz < PACKETSZ)
|
||||||
@@ -185,7 +188,10 @@ int main (int argc, char **argv)
|
|||||||
die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF);
|
die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rand_init();
|
#ifndef HAVE_LOOP
|
||||||
|
if (option_bool(OPT_LOOP_DETECT))
|
||||||
|
die(_("Loop detection not available: set HAVE_LOOP in src/config.h"), NULL, EC_BADCONF);
|
||||||
|
#endif
|
||||||
|
|
||||||
now = dnsmasq_time();
|
now = dnsmasq_time();
|
||||||
|
|
||||||
@@ -917,10 +923,10 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
#if defined(HAVE_LINUX_NETWORK)
|
#if defined(HAVE_LINUX_NETWORK)
|
||||||
if (FD_ISSET(daemon->netlinkfd, &rset))
|
if (FD_ISSET(daemon->netlinkfd, &rset))
|
||||||
netlink_multicast(now);
|
netlink_multicast();
|
||||||
#elif defined(HAVE_BSD_NETWORK)
|
#elif defined(HAVE_BSD_NETWORK)
|
||||||
if (FD_ISSET(daemon->routefd, &rset))
|
if (FD_ISSET(daemon->routefd, &rset))
|
||||||
route_sock(now);
|
route_sock();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check for changes to resolv files once per second max. */
|
/* Check for changes to resolv files once per second max. */
|
||||||
@@ -1037,6 +1043,11 @@ void send_alarm(time_t event, time_t now)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void queue_event(int event)
|
||||||
|
{
|
||||||
|
send_event(pipewrite, event, 0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void send_event(int fd, int event, int data, char *msg)
|
void send_event(int fd, int event, int data, char *msg)
|
||||||
{
|
{
|
||||||
struct event_desc ev;
|
struct event_desc ev;
|
||||||
@@ -1231,6 +1242,16 @@ static void async_event(int pipe, time_t now)
|
|||||||
log_reopen(daemon->log_file);
|
log_reopen(daemon->log_file);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EVENT_NEWADDR:
|
||||||
|
newaddress(now);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EVENT_NEWROUTE:
|
||||||
|
resend_query();
|
||||||
|
/* Force re-reading resolv file right now, for luck. */
|
||||||
|
poll_resolv(0, 1, now);
|
||||||
|
break;
|
||||||
|
|
||||||
case EVENT_TERM:
|
case EVENT_TERM:
|
||||||
/* Knock all our children on the head. */
|
/* Knock all our children on the head. */
|
||||||
for (i = 0; i < MAX_PROCS; i++)
|
for (i = 0; i < MAX_PROCS; i++)
|
||||||
@@ -1263,7 +1284,7 @@ static void async_event(int pipe, time_t now)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void poll_resolv(int force, int do_reload, time_t now)
|
static void poll_resolv(int force, int do_reload, time_t now)
|
||||||
{
|
{
|
||||||
struct resolvc *res, *latest;
|
struct resolvc *res, *latest;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|||||||
+27
-6
@@ -165,6 +165,8 @@ struct event_desc {
|
|||||||
#define EVENT_LUA_ERR 19
|
#define EVENT_LUA_ERR 19
|
||||||
#define EVENT_TFTP_ERR 20
|
#define EVENT_TFTP_ERR 20
|
||||||
#define EVENT_INIT 21
|
#define EVENT_INIT 21
|
||||||
|
#define EVENT_NEWADDR 22
|
||||||
|
#define EVENT_NEWROUTE 23
|
||||||
|
|
||||||
/* Exit codes. */
|
/* Exit codes. */
|
||||||
#define EC_GOOD 0
|
#define EC_GOOD 0
|
||||||
@@ -235,7 +237,8 @@ struct event_desc {
|
|||||||
#define OPT_DNSSEC_DEBUG 47
|
#define OPT_DNSSEC_DEBUG 47
|
||||||
#define OPT_DNSSEC_NO_SIGN 48
|
#define OPT_DNSSEC_NO_SIGN 48
|
||||||
#define OPT_LOCAL_SERVICE 49
|
#define OPT_LOCAL_SERVICE 49
|
||||||
#define OPT_LAST 50
|
#define OPT_LOOP_DETECT 50
|
||||||
|
#define OPT_LAST 51
|
||||||
|
|
||||||
/* extra flags for my_syslog, we use a couple of facilities since they are known
|
/* extra flags for my_syslog, we use a couple of facilities since they are known
|
||||||
not to occupy the same bits as priorities, no matter how syslog.h is set up. */
|
not to occupy the same bits as priorities, no matter how syslog.h is set up. */
|
||||||
@@ -476,6 +479,7 @@ union mysockaddr {
|
|||||||
#define SERV_USE_RESOLV 1024 /* forward this domain in the normal way */
|
#define SERV_USE_RESOLV 1024 /* forward this domain in the normal way */
|
||||||
#define SERV_NO_REBIND 2048 /* inhibit dns-rebind protection */
|
#define SERV_NO_REBIND 2048 /* inhibit dns-rebind protection */
|
||||||
#define SERV_FROM_FILE 4096 /* read from --servers-file */
|
#define SERV_FROM_FILE 4096 /* read from --servers-file */
|
||||||
|
#define SERV_LOOP 8192 /* server causes forwarding loop */
|
||||||
|
|
||||||
struct serverfd {
|
struct serverfd {
|
||||||
int fd;
|
int fd;
|
||||||
@@ -496,6 +500,9 @@ struct server {
|
|||||||
char *domain; /* set if this server only handles a domain. */
|
char *domain; /* set if this server only handles a domain. */
|
||||||
int flags, tcpfd;
|
int flags, tcpfd;
|
||||||
unsigned int queries, failed_queries;
|
unsigned int queries, failed_queries;
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
u32 uid;
|
||||||
|
#endif
|
||||||
struct server *next;
|
struct server *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -639,6 +646,8 @@ struct dhcp_lease {
|
|||||||
unsigned char *extradata;
|
unsigned char *extradata;
|
||||||
unsigned int extradata_len, extradata_size;
|
unsigned int extradata_len, extradata_size;
|
||||||
int last_interface;
|
int last_interface;
|
||||||
|
int new_interface; /* save possible originated interface */
|
||||||
|
int new_prefixlen; /* and its prefix length */
|
||||||
#ifdef HAVE_DHCP6
|
#ifdef HAVE_DHCP6
|
||||||
struct in6_addr addr6;
|
struct in6_addr addr6;
|
||||||
int iaid;
|
int iaid;
|
||||||
@@ -823,7 +832,7 @@ struct dhcp_context {
|
|||||||
#define CONTEXT_NETMASK (1u<<1)
|
#define CONTEXT_NETMASK (1u<<1)
|
||||||
#define CONTEXT_BRDCAST (1u<<2)
|
#define CONTEXT_BRDCAST (1u<<2)
|
||||||
#define CONTEXT_PROXY (1u<<3)
|
#define CONTEXT_PROXY (1u<<3)
|
||||||
#define CONTEXT_RA_ONLY (1u<<4)
|
#define CONTEXT_RA_ROUTER (1u<<4)
|
||||||
#define CONTEXT_RA_DONE (1u<<5)
|
#define CONTEXT_RA_DONE (1u<<5)
|
||||||
#define CONTEXT_RA_NAME (1u<<6)
|
#define CONTEXT_RA_NAME (1u<<6)
|
||||||
#define CONTEXT_RA_STATELESS (1u<<7)
|
#define CONTEXT_RA_STATELESS (1u<<7)
|
||||||
@@ -838,7 +847,6 @@ struct dhcp_context {
|
|||||||
#define CONTEXT_OLD (1u<<16)
|
#define CONTEXT_OLD (1u<<16)
|
||||||
#define CONTEXT_V6 (1u<<17)
|
#define CONTEXT_V6 (1u<<17)
|
||||||
|
|
||||||
|
|
||||||
struct ping_result {
|
struct ping_result {
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
time_t time;
|
time_t time;
|
||||||
@@ -1120,6 +1128,7 @@ unsigned char* hash_questions(struct dns_header *header, size_t plen, char *name
|
|||||||
/* util.c */
|
/* util.c */
|
||||||
void rand_init(void);
|
void rand_init(void);
|
||||||
unsigned short rand16(void);
|
unsigned short rand16(void);
|
||||||
|
u32 rand32(void);
|
||||||
u64 rand64(void);
|
u64 rand64(void);
|
||||||
int legal_hostname(char *c);
|
int legal_hostname(char *c);
|
||||||
char *canonicalise(char *s, int *nomem);
|
char *canonicalise(char *s, int *nomem);
|
||||||
@@ -1131,6 +1140,7 @@ int sa_len(union mysockaddr *addr);
|
|||||||
int sockaddr_isequal(union mysockaddr *s1, union mysockaddr *s2);
|
int sockaddr_isequal(union mysockaddr *s1, union mysockaddr *s2);
|
||||||
int hostname_isequal(const char *a, const char *b);
|
int hostname_isequal(const char *a, const char *b);
|
||||||
time_t dnsmasq_time(void);
|
time_t dnsmasq_time(void);
|
||||||
|
int netmask_length(struct in_addr mask);
|
||||||
int is_same_net(struct in_addr a, struct in_addr b, struct in_addr mask);
|
int is_same_net(struct in_addr a, struct in_addr b, struct in_addr mask);
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
int is_same_net6(struct in6_addr *a, struct in6_addr *b, int prefixlen);
|
int is_same_net6(struct in6_addr *a, struct in6_addr *b, int prefixlen);
|
||||||
@@ -1150,6 +1160,7 @@ void bump_maxfd(int fd, int *max);
|
|||||||
int read_write(int fd, unsigned char *packet, int size, int rw);
|
int read_write(int fd, unsigned char *packet, int size, int rw);
|
||||||
|
|
||||||
int wildcard_match(const char* wildcard, const char* match);
|
int wildcard_match(const char* wildcard, const char* match);
|
||||||
|
int wildcard_matchn(const char* wildcard, const char* match, int num);
|
||||||
|
|
||||||
/* log.c */
|
/* log.c */
|
||||||
void die(char *message, char *arg1, int exit_code);
|
void die(char *message, char *arg1, int exit_code);
|
||||||
@@ -1182,6 +1193,9 @@ struct frec *get_new_frec(time_t now, int *wait, int force);
|
|||||||
int send_from(int fd, int nowild, char *packet, size_t len,
|
int send_from(int fd, int nowild, char *packet, size_t len,
|
||||||
union mysockaddr *to, struct all_addr *source,
|
union mysockaddr *to, struct all_addr *source,
|
||||||
unsigned int iface);
|
unsigned int iface);
|
||||||
|
void resend_query();
|
||||||
|
struct randfd *allocate_rfd(int family);
|
||||||
|
void free_rfd(struct randfd *rfd);
|
||||||
|
|
||||||
/* network.c */
|
/* network.c */
|
||||||
int indextoname(int fd, int index, char *name);
|
int indextoname(int fd, int index, char *name);
|
||||||
@@ -1289,15 +1303,15 @@ unsigned char *extended_hwaddr(int hwtype, int hwlen, unsigned char *hwaddr,
|
|||||||
int make_icmp_sock(void);
|
int make_icmp_sock(void);
|
||||||
int icmp_ping(struct in_addr addr);
|
int icmp_ping(struct in_addr addr);
|
||||||
#endif
|
#endif
|
||||||
|
void queue_event(int event);
|
||||||
void send_alarm(time_t event, time_t now);
|
void send_alarm(time_t event, time_t now);
|
||||||
void send_event(int fd, int event, int data, char *msg);
|
void send_event(int fd, int event, int data, char *msg);
|
||||||
void clear_cache_and_reload(time_t now);
|
void clear_cache_and_reload(time_t now);
|
||||||
void poll_resolv(int force, int do_reload, time_t now);
|
|
||||||
|
|
||||||
/* netlink.c */
|
/* netlink.c */
|
||||||
#ifdef HAVE_LINUX_NETWORK
|
#ifdef HAVE_LINUX_NETWORK
|
||||||
void netlink_init(void);
|
void netlink_init(void);
|
||||||
void netlink_multicast(time_t now);
|
void netlink_multicast(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* bpf.c */
|
/* bpf.c */
|
||||||
@@ -1306,7 +1320,7 @@ void init_bpf(void);
|
|||||||
void send_via_bpf(struct dhcp_packet *mess, size_t len,
|
void send_via_bpf(struct dhcp_packet *mess, size_t len,
|
||||||
struct in_addr iface_addr, struct ifreq *ifr);
|
struct in_addr iface_addr, struct ifreq *ifr);
|
||||||
void route_init(void);
|
void route_init(void);
|
||||||
void route_sock(time_t now);
|
void route_sock(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* bpf.c or netlink.c */
|
/* bpf.c or netlink.c */
|
||||||
@@ -1447,3 +1461,10 @@ void slaac_add_addrs(struct dhcp_lease *lease, time_t now, int force);
|
|||||||
time_t periodic_slaac(time_t now, struct dhcp_lease *leases);
|
time_t periodic_slaac(time_t now, struct dhcp_lease *leases);
|
||||||
void slaac_ping_reply(struct in6_addr *sender, unsigned char *packet, char *interface, struct dhcp_lease *leases);
|
void slaac_ping_reply(struct in6_addr *sender, unsigned char *packet, char *interface, struct dhcp_lease *leases);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* loop.c */
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
void loop_send_probes();
|
||||||
|
int detect_loop(char *query, int type);
|
||||||
|
#endif
|
||||||
|
|
||||||
+18
-8
@@ -26,7 +26,14 @@
|
|||||||
# include <nettle/ecc-curve.h>
|
# include <nettle/ecc-curve.h>
|
||||||
#endif
|
#endif
|
||||||
#include <nettle/nettle-meta.h>
|
#include <nettle/nettle-meta.h>
|
||||||
#include <gmp.h>
|
#include <nettle/bignum.h>
|
||||||
|
|
||||||
|
/* Nettle-3.0 moved to a new API for DSA. We use a name that's defined in the new API
|
||||||
|
to detect Nettle-3, and invoke the backwards compatibility mode. */
|
||||||
|
#ifdef dsa_params_init
|
||||||
|
#include <nettle/dsa-compat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define SERIAL_UNDEF -100
|
#define SERIAL_UNDEF -100
|
||||||
#define SERIAL_EQ 0
|
#define SERIAL_EQ 0
|
||||||
@@ -120,8 +127,8 @@ static int hash_init(const struct nettle_hash *hash, void **ctxp, unsigned char
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
static int dnsmasq_rsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
||||||
unsigned char *digest, int algo)
|
unsigned char *digest, int algo)
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
size_t exp_len;
|
size_t exp_len;
|
||||||
@@ -172,8 +179,8 @@ static int rsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
static int dnsmasq_dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
||||||
unsigned char *digest, int algo)
|
unsigned char *digest, int algo)
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
unsigned int t;
|
unsigned int t;
|
||||||
@@ -292,10 +299,10 @@ static int verify(struct blockdata *key_data, unsigned int key_len, unsigned cha
|
|||||||
switch (algo)
|
switch (algo)
|
||||||
{
|
{
|
||||||
case 1: case 5: case 7: case 8: case 10:
|
case 1: case 5: case 7: case 8: case 10:
|
||||||
return rsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
return dnsmasq_rsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
||||||
|
|
||||||
case 3: case 6:
|
case 3: case 6:
|
||||||
return dsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
return dnsmasq_dsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
||||||
|
|
||||||
#ifndef NO_NETTLE_ECC
|
#ifndef NO_NETTLE_ECC
|
||||||
case 13: case 14:
|
case 13: case 14:
|
||||||
@@ -1683,6 +1690,9 @@ int dnssec_validate_reply(time_t now, struct dns_header *header, size_t plen, ch
|
|||||||
GETSHORT(qclass, p1);
|
GETSHORT(qclass, p1);
|
||||||
ans_start = p1;
|
ans_start = p1;
|
||||||
|
|
||||||
|
if (qtype == T_ANY)
|
||||||
|
have_answer = 1;
|
||||||
|
|
||||||
/* Can't validate an RRISG query */
|
/* Can't validate an RRISG query */
|
||||||
if (qtype == T_RRSIG)
|
if (qtype == T_RRSIG)
|
||||||
return STAT_INSECURE;
|
return STAT_INSECURE;
|
||||||
@@ -2219,7 +2229,7 @@ size_t filter_rrsigs(struct dns_header *header, size_t plen)
|
|||||||
|
|
||||||
if (i < ntohs(header->ancount))
|
if (i < ntohs(header->ancount))
|
||||||
chop_an++;
|
chop_an++;
|
||||||
else if (i < ntohs(header->nscount))
|
else if (i < (ntohs(header->nscount) + ntohs(header->ancount)))
|
||||||
chop_ns++;
|
chop_ns++;
|
||||||
else
|
else
|
||||||
chop_ar++;
|
chop_ar++;
|
||||||
|
|||||||
+62
-20
@@ -22,7 +22,6 @@ static struct frec *lookup_frec_by_sender(unsigned short id,
|
|||||||
void *hash);
|
void *hash);
|
||||||
static unsigned short get_id(void);
|
static unsigned short get_id(void);
|
||||||
static void free_frec(struct frec *f);
|
static void free_frec(struct frec *f);
|
||||||
static struct randfd *allocate_rfd(int family);
|
|
||||||
|
|
||||||
#ifdef HAVE_DNSSEC
|
#ifdef HAVE_DNSSEC
|
||||||
static int tcp_key_recurse(time_t now, int status, struct dns_header *header, size_t n,
|
static int tcp_key_recurse(time_t now, int status, struct dns_header *header, size_t n,
|
||||||
@@ -427,7 +426,7 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
|
|||||||
|
|
||||||
if (type == (start->flags & SERV_TYPE) &&
|
if (type == (start->flags & SERV_TYPE) &&
|
||||||
(type != SERV_HAS_DOMAIN || hostname_isequal(domain, start->domain)) &&
|
(type != SERV_HAS_DOMAIN || hostname_isequal(domain, start->domain)) &&
|
||||||
!(start->flags & SERV_LITERAL_ADDRESS))
|
!(start->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)))
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@@ -588,7 +587,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
|
|||||||
header->hb4 &= ~HB4_AD;
|
header->hb4 &= ~HB4_AD;
|
||||||
|
|
||||||
if (OPCODE(header) != QUERY || (RCODE(header) != NOERROR && RCODE(header) != NXDOMAIN))
|
if (OPCODE(header) != QUERY || (RCODE(header) != NOERROR && RCODE(header) != NXDOMAIN))
|
||||||
return n;
|
return resize_packet(header, n, pheader, plen);
|
||||||
|
|
||||||
/* Complain loudly if the upstream server is non-recursive. */
|
/* Complain loudly if the upstream server is non-recursive. */
|
||||||
if (!(header->hb4 & HB4_RA) && RCODE(header) == NOERROR && ntohs(header->ancount) == 0 &&
|
if (!(header->hb4 & HB4_RA) && RCODE(header) == NOERROR && ntohs(header->ancount) == 0 &&
|
||||||
@@ -1271,6 +1270,12 @@ void receive_query(struct listener *listen, time_t now)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
/* Check for forwarding loop */
|
||||||
|
if (detect_loop(daemon->namebuff, type))
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_AUTH
|
#ifdef HAVE_AUTH
|
||||||
@@ -1347,13 +1352,20 @@ static int do_check_sign(time_t now, struct dns_header *header, size_t plen, cha
|
|||||||
{
|
{
|
||||||
char *name_start;
|
char *name_start;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
int status = dnssec_validate_ds(now, header, plen, name, keyname, class);
|
int status;
|
||||||
|
|
||||||
if (status != STAT_INSECURE)
|
/* In this case only, a SERVFAIL reply allows us to continue up the tree, looking for a
|
||||||
|
suitable NSEC reply to DS queries. */
|
||||||
|
if (RCODE(header) != SERVFAIL)
|
||||||
{
|
{
|
||||||
if (status == STAT_NO_DS)
|
status = dnssec_validate_ds(now, header, plen, name, keyname, class);
|
||||||
status = STAT_INSECURE;
|
|
||||||
return status;
|
if (status != STAT_INSECURE)
|
||||||
|
{
|
||||||
|
if (status == STAT_NO_DS)
|
||||||
|
status = STAT_INSECURE;
|
||||||
|
return status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p = (unsigned char *)(header+1);
|
p = (unsigned char *)(header+1);
|
||||||
@@ -1446,8 +1458,13 @@ static int tcp_check_for_unsigned_zone(time_t now, struct dns_header *header, s
|
|||||||
newhash = hash_questions(header, (unsigned int)m, name);
|
newhash = hash_questions(header, (unsigned int)m, name);
|
||||||
if (newhash && memcmp(hash, newhash, HASH_SIZE) == 0)
|
if (newhash && memcmp(hash, newhash, HASH_SIZE) == 0)
|
||||||
{
|
{
|
||||||
/* Note this trashes all three name workspaces */
|
/* In this case only, a SERVFAIL reply allows us to continue up the tree, looking for a
|
||||||
status = tcp_key_recurse(now, STAT_NEED_DS_NEG, header, m, class, name, keyname, server, keycount);
|
suitable NSEC reply to DS queries. */
|
||||||
|
if (RCODE(header) == SERVFAIL)
|
||||||
|
status = STAT_INSECURE;
|
||||||
|
else
|
||||||
|
/* Note this trashes all three name workspaces */
|
||||||
|
status = tcp_key_recurse(now, STAT_NEED_DS_NEG, header, m, class, name, keyname, server, keycount);
|
||||||
|
|
||||||
/* We've found a DS which proves the bit of the DNS where the
|
/* We've found a DS which proves the bit of the DNS where the
|
||||||
original query is, is unsigned, so the answer is OK,
|
original query is, is unsigned, so the answer is OK,
|
||||||
@@ -1770,7 +1787,8 @@ unsigned char *tcp_request(int confd, time_t now,
|
|||||||
|
|
||||||
/* server for wrong domain */
|
/* server for wrong domain */
|
||||||
if (type != (last_server->flags & SERV_TYPE) ||
|
if (type != (last_server->flags & SERV_TYPE) ||
|
||||||
(type == SERV_HAS_DOMAIN && !hostname_isequal(domain, last_server->domain)))
|
(type == SERV_HAS_DOMAIN && !hostname_isequal(domain, last_server->domain)) ||
|
||||||
|
(last_server->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (last_server->tcpfd == -1)
|
if (last_server->tcpfd == -1)
|
||||||
@@ -1824,6 +1842,10 @@ unsigned char *tcp_request(int confd, time_t now,
|
|||||||
|
|
||||||
*length = htons(size);
|
*length = htons(size);
|
||||||
|
|
||||||
|
/* get query name again for logging - may have been overwritten */
|
||||||
|
if (!(gotname = extract_request(header, (unsigned int)size, daemon->namebuff, &qtype)))
|
||||||
|
strcpy(daemon->namebuff, "query");
|
||||||
|
|
||||||
if (!read_write(last_server->tcpfd, packet, size + sizeof(u16), 0) ||
|
if (!read_write(last_server->tcpfd, packet, size + sizeof(u16), 0) ||
|
||||||
!read_write(last_server->tcpfd, &c1, 1, 1) ||
|
!read_write(last_server->tcpfd, &c1, 1, 1) ||
|
||||||
!read_write(last_server->tcpfd, &c2, 1, 1) ||
|
!read_write(last_server->tcpfd, &c2, 1, 1) ||
|
||||||
@@ -1836,8 +1858,6 @@ unsigned char *tcp_request(int confd, time_t now,
|
|||||||
|
|
||||||
m = (c1 << 8) | c2;
|
m = (c1 << 8) | c2;
|
||||||
|
|
||||||
if (!gotname)
|
|
||||||
strcpy(daemon->namebuff, "query");
|
|
||||||
if (last_server->addr.sa.sa_family == AF_INET)
|
if (last_server->addr.sa.sa_family == AF_INET)
|
||||||
log_query(F_SERVER | F_IPV4 | F_FORWARD, daemon->namebuff,
|
log_query(F_SERVER | F_IPV4 | F_FORWARD, daemon->namebuff,
|
||||||
(struct all_addr *)&last_server->addr.in.sin_addr, NULL);
|
(struct all_addr *)&last_server->addr.in.sin_addr, NULL);
|
||||||
@@ -1944,7 +1964,7 @@ static struct frec *allocate_frec(time_t now)
|
|||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct randfd *allocate_rfd(int family)
|
struct randfd *allocate_rfd(int family)
|
||||||
{
|
{
|
||||||
static int finger = 0;
|
static int finger = 0;
|
||||||
int i;
|
int i;
|
||||||
@@ -1979,19 +1999,22 @@ static struct randfd *allocate_rfd(int family)
|
|||||||
|
|
||||||
return NULL; /* doom */
|
return NULL; /* doom */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void free_rfd(struct randfd *rfd)
|
||||||
|
{
|
||||||
|
if (rfd && --(rfd->refcount) == 0)
|
||||||
|
close(rfd->fd);
|
||||||
|
}
|
||||||
|
|
||||||
static void free_frec(struct frec *f)
|
static void free_frec(struct frec *f)
|
||||||
{
|
{
|
||||||
if (f->rfd4 && --(f->rfd4->refcount) == 0)
|
free_rfd(f->rfd4);
|
||||||
close(f->rfd4->fd);
|
|
||||||
|
|
||||||
f->rfd4 = NULL;
|
f->rfd4 = NULL;
|
||||||
f->sentto = NULL;
|
f->sentto = NULL;
|
||||||
f->flags = 0;
|
f->flags = 0;
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
if (f->rfd6 && --(f->rfd6->refcount) == 0)
|
free_rfd(f->rfd6);
|
||||||
close(f->rfd6->fd);
|
|
||||||
|
|
||||||
f->rfd6 = NULL;
|
f->rfd6 = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2117,6 +2140,25 @@ static struct frec *lookup_frec_by_sender(unsigned short id,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Send query packet again, if we can. */
|
||||||
|
void resend_query()
|
||||||
|
{
|
||||||
|
if (daemon->srv_save)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
if (daemon->srv_save->sfd)
|
||||||
|
fd = daemon->srv_save->sfd->fd;
|
||||||
|
else if (daemon->rfd_save && daemon->rfd_save->refcount != 0)
|
||||||
|
fd = daemon->rfd_save->fd;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
while(sendto(fd, daemon->packet, daemon->packet_len, 0,
|
||||||
|
&daemon->srv_save->addr.sa, sa_len(&daemon->srv_save->addr)) == -1 && retry_send());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* A server record is going away, remove references to it */
|
/* A server record is going away, remove references to it */
|
||||||
void server_gone(struct server *server)
|
void server_gone(struct server *server)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "dnsmasq.h"
|
#include "dnsmasq.h"
|
||||||
|
|
||||||
#ifdef HAVE_IPSET
|
#if defined(HAVE_IPSET) && defined(HAVE_LINUX_NETWORK)
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|||||||
+25
-5
@@ -352,15 +352,20 @@ static int find_interface_v4(struct in_addr local, int if_index, char *label,
|
|||||||
struct in_addr netmask, struct in_addr broadcast, void *vparam)
|
struct in_addr netmask, struct in_addr broadcast, void *vparam)
|
||||||
{
|
{
|
||||||
struct dhcp_lease *lease;
|
struct dhcp_lease *lease;
|
||||||
|
int prefix = netmask_length(netmask);
|
||||||
|
|
||||||
(void) label;
|
(void) label;
|
||||||
(void) broadcast;
|
(void) broadcast;
|
||||||
(void) vparam;
|
(void) vparam;
|
||||||
|
|
||||||
for (lease = leases; lease; lease = lease->next)
|
for (lease = leases; lease; lease = lease->next)
|
||||||
if (!(lease->flags & (LEASE_TA | LEASE_NA)))
|
if (!(lease->flags & (LEASE_TA | LEASE_NA)) &&
|
||||||
if (is_same_net(local, lease->addr, netmask))
|
is_same_net(local, lease->addr, netmask) &&
|
||||||
lease_set_interface(lease, if_index, *((time_t *)vparam));
|
prefix > lease->new_prefixlen)
|
||||||
|
{
|
||||||
|
lease->new_interface = if_index;
|
||||||
|
lease->new_prefixlen = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -376,11 +381,17 @@ static int find_interface_v6(struct in6_addr *local, int prefix,
|
|||||||
(void)flags;
|
(void)flags;
|
||||||
(void)preferred;
|
(void)preferred;
|
||||||
(void)valid;
|
(void)valid;
|
||||||
|
(void)vparam;
|
||||||
|
|
||||||
for (lease = leases; lease; lease = lease->next)
|
for (lease = leases; lease; lease = lease->next)
|
||||||
if ((lease->flags & (LEASE_TA | LEASE_NA)))
|
if ((lease->flags & (LEASE_TA | LEASE_NA)))
|
||||||
if (is_same_net6(local, &lease->addr6, prefix))
|
if (is_same_net6(local, &lease->addr6, prefix) && prefix > lease->new_prefixlen) {
|
||||||
lease_set_interface(lease, if_index, *((time_t *)vparam));
|
/* save prefix length for comparison, as we might get shorter matching
|
||||||
|
* prefix in upcoming netlink GETADDR responses
|
||||||
|
* */
|
||||||
|
lease->new_interface = if_index;
|
||||||
|
lease->new_prefixlen = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -414,10 +425,19 @@ void lease_update_slaac(time_t now)
|
|||||||
start-time. */
|
start-time. */
|
||||||
void lease_find_interfaces(time_t now)
|
void lease_find_interfaces(time_t now)
|
||||||
{
|
{
|
||||||
|
struct dhcp_lease *lease;
|
||||||
|
|
||||||
|
for (lease = leases; lease; lease = lease->next)
|
||||||
|
lease->new_prefixlen = lease->new_interface = 0;
|
||||||
|
|
||||||
iface_enumerate(AF_INET, &now, find_interface_v4);
|
iface_enumerate(AF_INET, &now, find_interface_v4);
|
||||||
#ifdef HAVE_DHCP6
|
#ifdef HAVE_DHCP6
|
||||||
iface_enumerate(AF_INET6, &now, find_interface_v6);
|
iface_enumerate(AF_INET6, &now, find_interface_v6);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (lease = leases; lease; lease = lease->next)
|
||||||
|
if (lease->new_interface != 0)
|
||||||
|
lease_set_interface(lease, lease->new_interface, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DHCP6
|
#ifdef HAVE_DHCP6
|
||||||
|
|||||||
+116
@@ -0,0 +1,116 @@
|
|||||||
|
/* dnsmasq is Copyright (c) 2000-2014 Simon Kelley
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 dated June, 1991, or
|
||||||
|
(at your option) version 3 dated 29 June, 2007.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dnsmasq.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
static ssize_t loop_make_probe(u32 uid);
|
||||||
|
|
||||||
|
void loop_send_probes()
|
||||||
|
{
|
||||||
|
struct server *serv;
|
||||||
|
|
||||||
|
if (!option_bool(OPT_LOOP_DETECT))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Loop through all upstream servers not for particular domains, and send a query to that server which is
|
||||||
|
identifiable, via the uid. If we see that query back again, then the server is looping, and we should not use it. */
|
||||||
|
for (serv = daemon->servers; serv; serv = serv->next)
|
||||||
|
if (!(serv->flags &
|
||||||
|
(SERV_LITERAL_ADDRESS | SERV_NO_ADDR | SERV_USE_RESOLV | SERV_NO_REBIND | SERV_HAS_DOMAIN | SERV_FOR_NODOTS | SERV_LOOP)))
|
||||||
|
{
|
||||||
|
ssize_t len = loop_make_probe(serv->uid);
|
||||||
|
int fd;
|
||||||
|
struct randfd *rfd = NULL;
|
||||||
|
|
||||||
|
if (serv->sfd)
|
||||||
|
fd = serv->sfd->fd;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(rfd = allocate_rfd(serv->addr.sa.sa_family)))
|
||||||
|
continue;
|
||||||
|
fd = rfd->fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (sendto(fd, daemon->packet, len, 0, &serv->addr.sa, sa_len(&serv->addr)) == -1 && retry_send());
|
||||||
|
|
||||||
|
free_rfd(rfd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static ssize_t loop_make_probe(u32 uid)
|
||||||
|
{
|
||||||
|
struct dns_header *header = (struct dns_header *)daemon->packet;
|
||||||
|
unsigned char *p = (unsigned char *)(header+1);
|
||||||
|
|
||||||
|
/* packet buffer overwritten */
|
||||||
|
daemon->srv_save = NULL;
|
||||||
|
|
||||||
|
header->id = rand16();
|
||||||
|
header->ancount = header->nscount = header->arcount = htons(0);
|
||||||
|
header->qdcount = htons(1);
|
||||||
|
header->hb3 = HB3_RD;
|
||||||
|
header->hb4 = 0;
|
||||||
|
SET_OPCODE(header, QUERY);
|
||||||
|
|
||||||
|
*p++ = 8;
|
||||||
|
sprintf((char *)p, "%.8x", uid);
|
||||||
|
p += 8;
|
||||||
|
*p++ = strlen(LOOP_TEST_DOMAIN);
|
||||||
|
strcpy((char *)p, LOOP_TEST_DOMAIN); /* Add terminating zero */
|
||||||
|
p += strlen(LOOP_TEST_DOMAIN) + 1;
|
||||||
|
|
||||||
|
PUTSHORT(LOOP_TEST_TYPE, p);
|
||||||
|
PUTSHORT(C_IN, p);
|
||||||
|
|
||||||
|
return p - (unsigned char *)header;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int detect_loop(char *query, int type)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
u32 uid;
|
||||||
|
struct server *serv;
|
||||||
|
|
||||||
|
if (!option_bool(OPT_LOOP_DETECT))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (type != LOOP_TEST_TYPE ||
|
||||||
|
strlen(LOOP_TEST_DOMAIN) + 9 != strlen(query) ||
|
||||||
|
strstr(query, LOOP_TEST_DOMAIN) != query + 9)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
if (!isxdigit(query[i]))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
uid = strtol(query, NULL, 16);
|
||||||
|
|
||||||
|
for (serv = daemon->servers; serv; serv = serv->next)
|
||||||
|
if (!(serv->flags &
|
||||||
|
(SERV_LITERAL_ADDRESS | SERV_NO_ADDR | SERV_USE_RESOLV | SERV_NO_REBIND | SERV_HAS_DOMAIN | SERV_FOR_NODOTS | SERV_LOOP)) &&
|
||||||
|
uid == serv->uid)
|
||||||
|
{
|
||||||
|
serv->flags |= SERV_LOOP;
|
||||||
|
check_servers(); /* log new state */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
+10
-47
@@ -38,7 +38,7 @@
|
|||||||
static struct iovec iov;
|
static struct iovec iov;
|
||||||
static u32 netlink_pid;
|
static u32 netlink_pid;
|
||||||
|
|
||||||
static int nl_async(struct nlmsghdr *h);
|
static void nl_async(struct nlmsghdr *h);
|
||||||
|
|
||||||
void netlink_init(void)
|
void netlink_init(void)
|
||||||
{
|
{
|
||||||
@@ -142,7 +142,7 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
struct nlmsghdr *h;
|
struct nlmsghdr *h;
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
static unsigned int seq = 0;
|
static unsigned int seq = 0;
|
||||||
int callback_ok = 1, newaddr = 0;
|
int callback_ok = 1;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct nlmsghdr nlh;
|
struct nlmsghdr nlh;
|
||||||
@@ -191,21 +191,10 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
if (h->nlmsg_seq != seq || h->nlmsg_pid != netlink_pid || h->nlmsg_type == NLMSG_ERROR)
|
if (h->nlmsg_seq != seq || h->nlmsg_pid != netlink_pid || h->nlmsg_type == NLMSG_ERROR)
|
||||||
{
|
{
|
||||||
/* May be multicast arriving async */
|
/* May be multicast arriving async */
|
||||||
if (nl_async(h))
|
nl_async(h);
|
||||||
{
|
|
||||||
newaddr = 1;
|
|
||||||
enumerate_interfaces(1); /* reset */
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (h->nlmsg_type == NLMSG_DONE)
|
else if (h->nlmsg_type == NLMSG_DONE)
|
||||||
{
|
return callback_ok;
|
||||||
/* handle async new interface address arrivals, these have to be done
|
|
||||||
after we complete as we're not re-entrant */
|
|
||||||
if (newaddr)
|
|
||||||
newaddress(dnsmasq_time());
|
|
||||||
|
|
||||||
return callback_ok;
|
|
||||||
}
|
|
||||||
else if (h->nlmsg_type == RTM_NEWADDR && family != AF_UNSPEC && family != AF_LOCAL)
|
else if (h->nlmsg_type == RTM_NEWADDR && family != AF_UNSPEC && family != AF_LOCAL)
|
||||||
{
|
{
|
||||||
struct ifaddrmsg *ifa = NLMSG_DATA(h);
|
struct ifaddrmsg *ifa = NLMSG_DATA(h);
|
||||||
@@ -330,11 +319,11 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void netlink_multicast(time_t now)
|
void netlink_multicast(void)
|
||||||
{
|
{
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
struct nlmsghdr *h;
|
struct nlmsghdr *h;
|
||||||
int flags, newaddr = 0;
|
int flags;
|
||||||
|
|
||||||
/* don't risk blocking reading netlink messages here. */
|
/* don't risk blocking reading netlink messages here. */
|
||||||
if ((flags = fcntl(daemon->netlinkfd, F_GETFL)) == -1 ||
|
if ((flags = fcntl(daemon->netlinkfd, F_GETFL)) == -1 ||
|
||||||
@@ -343,24 +332,19 @@ void netlink_multicast(time_t now)
|
|||||||
|
|
||||||
if ((len = netlink_recv()) != -1)
|
if ((len = netlink_recv()) != -1)
|
||||||
for (h = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(h, (size_t)len); h = NLMSG_NEXT(h, len))
|
for (h = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(h, (size_t)len); h = NLMSG_NEXT(h, len))
|
||||||
if (nl_async(h))
|
nl_async(h);
|
||||||
newaddr = 1;
|
|
||||||
|
|
||||||
/* restore non-blocking status */
|
/* restore non-blocking status */
|
||||||
fcntl(daemon->netlinkfd, F_SETFL, flags);
|
fcntl(daemon->netlinkfd, F_SETFL, flags);
|
||||||
|
|
||||||
if (newaddr)
|
|
||||||
newaddress(now);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nl_async(struct nlmsghdr *h)
|
static void nl_async(struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
if (h->nlmsg_type == NLMSG_ERROR)
|
if (h->nlmsg_type == NLMSG_ERROR)
|
||||||
{
|
{
|
||||||
struct nlmsgerr *err = NLMSG_DATA(h);
|
struct nlmsgerr *err = NLMSG_DATA(h);
|
||||||
if (err->error != 0)
|
if (err->error != 0)
|
||||||
my_syslog(LOG_ERR, _("netlink returns error: %s"), strerror(-(err->error)));
|
my_syslog(LOG_ERR, _("netlink returns error: %s"), strerror(-(err->error)));
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
else if (h->nlmsg_pid == 0 && h->nlmsg_type == RTM_NEWROUTE)
|
else if (h->nlmsg_pid == 0 && h->nlmsg_type == RTM_NEWROUTE)
|
||||||
{
|
{
|
||||||
@@ -372,31 +356,10 @@ static int nl_async(struct nlmsghdr *h)
|
|||||||
struct rtmsg *rtm = NLMSG_DATA(h);
|
struct rtmsg *rtm = NLMSG_DATA(h);
|
||||||
|
|
||||||
if (rtm->rtm_type == RTN_UNICAST && rtm->rtm_scope == RT_SCOPE_LINK)
|
if (rtm->rtm_type == RTN_UNICAST && rtm->rtm_scope == RT_SCOPE_LINK)
|
||||||
{
|
queue_event(EVENT_NEWROUTE);
|
||||||
/* Force re-reading resolv file right now, for luck. */
|
|
||||||
daemon->last_resolv = 0;
|
|
||||||
|
|
||||||
if (daemon->srv_save)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
if (daemon->srv_save->sfd)
|
|
||||||
fd = daemon->srv_save->sfd->fd;
|
|
||||||
else if (daemon->rfd_save && daemon->rfd_save->refcount != 0)
|
|
||||||
fd = daemon->rfd_save->fd;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
while(sendto(fd, daemon->packet, daemon->packet_len, 0,
|
|
||||||
&daemon->srv_save->addr.sa, sa_len(&daemon->srv_save->addr)) == -1 && retry_send());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
else if (h->nlmsg_type == RTM_NEWADDR || h->nlmsg_type == RTM_DELADDR)
|
else if (h->nlmsg_type == RTM_NEWADDR || h->nlmsg_type == RTM_DELADDR)
|
||||||
return 1; /* clever bind mode - rescan */
|
queue_event(EVENT_NEWADDR);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+22
-11
@@ -551,7 +551,7 @@ static int iface_allowed_v4(struct in_addr local, int if_index, char *label,
|
|||||||
int enumerate_interfaces(int reset)
|
int enumerate_interfaces(int reset)
|
||||||
{
|
{
|
||||||
static struct addrlist *spare = NULL;
|
static struct addrlist *spare = NULL;
|
||||||
static int done = 0, active = 0;
|
static int done = 0;
|
||||||
struct iface_param param;
|
struct iface_param param;
|
||||||
int errsave, ret = 1;
|
int errsave, ret = 1;
|
||||||
struct addrlist *addr, *tmp;
|
struct addrlist *addr, *tmp;
|
||||||
@@ -570,14 +570,11 @@ int enumerate_interfaces(int reset)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done || active)
|
if (done)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
done = 1;
|
done = 1;
|
||||||
|
|
||||||
/* protect against recusive calls from iface_enumerate(); */
|
|
||||||
active = 1;
|
|
||||||
|
|
||||||
if ((param.fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1)
|
if ((param.fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -677,9 +674,7 @@ int enumerate_interfaces(int reset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
errno = errsave;
|
errno = errsave;
|
||||||
|
|
||||||
spare = param.spare;
|
spare = param.spare;
|
||||||
active = 0;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -1302,8 +1297,14 @@ void mark_servers(int flag)
|
|||||||
|
|
||||||
/* mark everything with argument flag */
|
/* mark everything with argument flag */
|
||||||
for (serv = daemon->servers; serv; serv = serv->next)
|
for (serv = daemon->servers; serv; serv = serv->next)
|
||||||
if (serv->flags & flag)
|
{
|
||||||
serv->flags |= SERV_MARK;
|
if (serv->flags & flag)
|
||||||
|
serv->flags |= SERV_MARK;
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
/* Give looped servers another chance */
|
||||||
|
serv->flags &= ~SERV_LOOP;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanup_servers(void)
|
void cleanup_servers(void)
|
||||||
@@ -1325,6 +1326,11 @@ void cleanup_servers(void)
|
|||||||
else
|
else
|
||||||
up = &serv->next;
|
up = &serv->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
/* Now we have a new set of servers, test for loops. */
|
||||||
|
loop_send_probes();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_update_server(int flags,
|
void add_update_server(int flags,
|
||||||
@@ -1390,6 +1396,9 @@ void add_update_server(int flags,
|
|||||||
serv->domain = domain_str;
|
serv->domain = domain_str;
|
||||||
serv->next = next;
|
serv->next = next;
|
||||||
serv->queries = serv->failed_queries = 0;
|
serv->queries = serv->failed_queries = 0;
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
serv->uid = rand32();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (domain)
|
if (domain)
|
||||||
serv->flags |= SERV_HAS_DOMAIN;
|
serv->flags |= SERV_HAS_DOMAIN;
|
||||||
@@ -1469,6 +1478,10 @@ void check_servers(void)
|
|||||||
else if (!(serv->flags & SERV_LITERAL_ADDRESS))
|
else if (!(serv->flags & SERV_LITERAL_ADDRESS))
|
||||||
my_syslog(LOG_INFO, _("using nameserver %s#%d for %s %s"), daemon->namebuff, port, s1, s2);
|
my_syslog(LOG_INFO, _("using nameserver %s#%d for %s %s"), daemon->namebuff, port, s1, s2);
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
else if (serv->flags & SERV_LOOP)
|
||||||
|
my_syslog(LOG_INFO, _("NOT using nameserver %s#%d - query loop detected"), daemon->namebuff, port);
|
||||||
|
#endif
|
||||||
else if (serv->interface[0] != 0)
|
else if (serv->interface[0] != 0)
|
||||||
my_syslog(LOG_INFO, _("using nameserver %s#%d(via %s)"), daemon->namebuff, port, serv->interface);
|
my_syslog(LOG_INFO, _("using nameserver %s#%d(via %s)"), daemon->namebuff, port, serv->interface);
|
||||||
else
|
else
|
||||||
@@ -1564,7 +1577,6 @@ int reload_servers(char *fname)
|
|||||||
return gotone;
|
return gotone;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_LINUX_NETWORK) || defined(HAVE_BSD_NETWORK)
|
|
||||||
/* Called when addresses are added or deleted from an interface */
|
/* Called when addresses are added or deleted from an interface */
|
||||||
void newaddress(time_t now)
|
void newaddress(time_t now)
|
||||||
{
|
{
|
||||||
@@ -1589,7 +1601,6 @@ void newaddress(time_t now)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+40
-7
@@ -146,6 +146,7 @@ struct myoption {
|
|||||||
#define LOPT_DNSSEC_CHECK 334
|
#define LOPT_DNSSEC_CHECK 334
|
||||||
#define LOPT_LOCAL_SERVICE 335
|
#define LOPT_LOCAL_SERVICE 335
|
||||||
#define LOPT_DNSSEC_TIME 336
|
#define LOPT_DNSSEC_TIME 336
|
||||||
|
#define LOPT_LOOP_DETECT 337
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
static const struct option opts[] =
|
static const struct option opts[] =
|
||||||
@@ -297,6 +298,7 @@ static const struct myoption opts[] =
|
|||||||
{ "quiet-dhcp", 0, 0, LOPT_QUIET_DHCP },
|
{ "quiet-dhcp", 0, 0, LOPT_QUIET_DHCP },
|
||||||
{ "quiet-dhcp6", 0, 0, LOPT_QUIET_DHCP6 },
|
{ "quiet-dhcp6", 0, 0, LOPT_QUIET_DHCP6 },
|
||||||
{ "quiet-ra", 0, 0, LOPT_QUIET_RA },
|
{ "quiet-ra", 0, 0, LOPT_QUIET_RA },
|
||||||
|
{ "dns-loop-detect", 0, 0, LOPT_LOOP_DETECT },
|
||||||
{ NULL, 0, 0, 0 }
|
{ NULL, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -454,6 +456,7 @@ static struct {
|
|||||||
{ LOPT_QUIET_DHCP6, OPT_QUIET_DHCP6, NULL, gettext_noop("Do not log routine DHCPv6."), NULL },
|
{ LOPT_QUIET_DHCP6, OPT_QUIET_DHCP6, NULL, gettext_noop("Do not log routine DHCPv6."), NULL },
|
||||||
{ LOPT_QUIET_RA, OPT_QUIET_RA, NULL, gettext_noop("Do not log RA."), NULL },
|
{ LOPT_QUIET_RA, OPT_QUIET_RA, NULL, gettext_noop("Do not log RA."), NULL },
|
||||||
{ LOPT_LOCAL_SERVICE, OPT_LOCAL_SERVICE, NULL, gettext_noop("Accept queries only from directly-connected networks"), NULL },
|
{ LOPT_LOCAL_SERVICE, OPT_LOCAL_SERVICE, NULL, gettext_noop("Accept queries only from directly-connected networks"), NULL },
|
||||||
|
{ LOPT_LOOP_DETECT, OPT_LOOP_DETECT, NULL, gettext_noop("Detect and remove DNS forwarding loops"), NULL },
|
||||||
{ 0, 0, NULL, NULL, NULL }
|
{ 0, 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1462,7 +1465,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
struct list {
|
struct list {
|
||||||
char *suffix;
|
char *suffix;
|
||||||
struct list *next;
|
struct list *next;
|
||||||
} *ignore_suffix = NULL, *li;
|
} *ignore_suffix = NULL, *match_suffix = NULL, *li;
|
||||||
|
|
||||||
comma = split(arg);
|
comma = split(arg);
|
||||||
if (!(directory = opt_string_alloc(arg)))
|
if (!(directory = opt_string_alloc(arg)))
|
||||||
@@ -1472,10 +1475,20 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
{
|
{
|
||||||
comma = split(arg);
|
comma = split(arg);
|
||||||
li = opt_malloc(sizeof(struct list));
|
li = opt_malloc(sizeof(struct list));
|
||||||
li->next = ignore_suffix;
|
if (*arg == '*')
|
||||||
ignore_suffix = li;
|
{
|
||||||
/* Have to copy: buffer is overwritten */
|
li->next = match_suffix;
|
||||||
li->suffix = opt_string_alloc(arg);
|
match_suffix = li;
|
||||||
|
/* Have to copy: buffer is overwritten */
|
||||||
|
li->suffix = opt_string_alloc(arg+1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
li->next = ignore_suffix;
|
||||||
|
ignore_suffix = li;
|
||||||
|
/* Have to copy: buffer is overwritten */
|
||||||
|
li->suffix = opt_string_alloc(arg);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(dir_stream = opendir(directory)))
|
if (!(dir_stream = opendir(directory)))
|
||||||
@@ -1493,6 +1506,20 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
ent->d_name[0] == '.')
|
ent->d_name[0] == '.')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (match_suffix)
|
||||||
|
{
|
||||||
|
for (li = match_suffix; li; li = li->next)
|
||||||
|
{
|
||||||
|
/* check for required suffices */
|
||||||
|
size_t ls = strlen(li->suffix);
|
||||||
|
if (len > ls &&
|
||||||
|
strcmp(li->suffix, &ent->d_name[len - ls]) == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!li)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (li = ignore_suffix; li; li = li->next)
|
for (li = ignore_suffix; li; li = li->next)
|
||||||
{
|
{
|
||||||
/* check for proscribed suffices */
|
/* check for proscribed suffices */
|
||||||
@@ -2171,6 +2198,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
{
|
{
|
||||||
newlist = opt_malloc(sizeof(struct server));
|
newlist = opt_malloc(sizeof(struct server));
|
||||||
memset(newlist, 0, sizeof(struct server));
|
memset(newlist, 0, sizeof(struct server));
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
newlist->uid = rand32();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (servers_only && option == 'S')
|
if (servers_only && option == 'S')
|
||||||
@@ -2583,9 +2613,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
if (strcmp(a[leasepos], "static") == 0)
|
if (strcmp(a[leasepos], "static") == 0)
|
||||||
new->flags |= CONTEXT_STATIC | CONTEXT_DHCP;
|
new->flags |= CONTEXT_STATIC | CONTEXT_DHCP;
|
||||||
else if (strcmp(a[leasepos], "ra-only") == 0 || strcmp(a[leasepos], "slaac") == 0 )
|
else if (strcmp(a[leasepos], "ra-only") == 0 || strcmp(a[leasepos], "slaac") == 0 )
|
||||||
new->flags |= CONTEXT_RA_ONLY | CONTEXT_RA;
|
new->flags |= CONTEXT_RA;
|
||||||
else if (strcmp(a[leasepos], "ra-names") == 0)
|
else if (strcmp(a[leasepos], "ra-names") == 0)
|
||||||
new->flags |= CONTEXT_RA_NAME | CONTEXT_RA;
|
new->flags |= CONTEXT_RA_NAME | CONTEXT_RA;
|
||||||
|
else if (strcmp(a[leasepos], "ra-advrouter") == 0)
|
||||||
|
new->flags |= CONTEXT_RA_ROUTER | CONTEXT_RA;
|
||||||
else if (strcmp(a[leasepos], "ra-stateless") == 0)
|
else if (strcmp(a[leasepos], "ra-stateless") == 0)
|
||||||
new->flags |= CONTEXT_RA_STATELESS | CONTEXT_DHCP | CONTEXT_RA;
|
new->flags |= CONTEXT_RA_STATELESS | CONTEXT_DHCP | CONTEXT_RA;
|
||||||
else if (leasepos == 1 && inet_pton(AF_INET6, a[leasepos], &new->end6))
|
else if (leasepos == 1 && inet_pton(AF_INET6, a[leasepos], &new->end6))
|
||||||
@@ -2615,7 +2647,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
|
|
||||||
if (new->prefix != 64)
|
if (new->prefix != 64)
|
||||||
{
|
{
|
||||||
if ((new->flags & (CONTEXT_RA_ONLY | CONTEXT_RA_NAME | CONTEXT_RA_STATELESS)))
|
if (new->flags & CONTEXT_RA)
|
||||||
ret_err(_("prefix length must be exactly 64 for RA subnets"));
|
ret_err(_("prefix length must be exactly 64 for RA subnets"));
|
||||||
else if (new->flags & CONTEXT_TEMPLATE)
|
else if (new->flags & CONTEXT_TEMPLATE)
|
||||||
ret_err(_("prefix length must be exactly 64 for subnet constructors"));
|
ret_err(_("prefix length must be exactly 64 for subnet constructors"));
|
||||||
@@ -4267,6 +4299,7 @@ void read_opts(int argc, char **argv, char *compile_opts)
|
|||||||
daemon->soa_refresh = SOA_REFRESH;
|
daemon->soa_refresh = SOA_REFRESH;
|
||||||
daemon->soa_retry = SOA_RETRY;
|
daemon->soa_retry = SOA_RETRY;
|
||||||
daemon->soa_expiry = SOA_EXPIRY;
|
daemon->soa_expiry = SOA_EXPIRY;
|
||||||
|
|
||||||
add_txt("version.bind", "dnsmasq-" VERSION, 0 );
|
add_txt("version.bind", "dnsmasq-" VERSION, 0 );
|
||||||
add_txt("authors.bind", "Simon Kelley", 0);
|
add_txt("authors.bind", "Simon Kelley", 0);
|
||||||
add_txt("copyright.bind", COPYRIGHT, 0);
|
add_txt("copyright.bind", COPYRIGHT, 0);
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ struct prefix_opt {
|
|||||||
#define ICMP6_OPT_SOURCE_MAC 1
|
#define ICMP6_OPT_SOURCE_MAC 1
|
||||||
#define ICMP6_OPT_PREFIX 3
|
#define ICMP6_OPT_PREFIX 3
|
||||||
#define ICMP6_OPT_MTU 5
|
#define ICMP6_OPT_MTU 5
|
||||||
|
#define ICMP6_OPT_ADV_INTERVAL 7
|
||||||
|
#define ICMP6_OPT_RT_INFO 24
|
||||||
#define ICMP6_OPT_RDNSS 25
|
#define ICMP6_OPT_RDNSS 25
|
||||||
#define ICMP6_OPT_DNSSL 31
|
#define ICMP6_OPT_DNSSL 31
|
||||||
|
|
||||||
|
|||||||
+73
-20
@@ -28,11 +28,11 @@
|
|||||||
|
|
||||||
struct ra_param {
|
struct ra_param {
|
||||||
time_t now;
|
time_t now;
|
||||||
int ind, managed, other, found_context, first;
|
int ind, managed, other, found_context, first, adv_router;
|
||||||
char *if_name;
|
char *if_name;
|
||||||
struct dhcp_netid *tags;
|
struct dhcp_netid *tags;
|
||||||
struct in6_addr link_local, link_global, ula;
|
struct in6_addr link_local, link_global, ula;
|
||||||
unsigned int glob_pref_time, link_pref_time, ula_pref_time, adv_interval;
|
unsigned int glob_pref_time, link_pref_time, ula_pref_time, adv_interval, prio;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct search_param {
|
struct search_param {
|
||||||
@@ -211,27 +211,29 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
|
|||||||
FILE *f;
|
FILE *f;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
parm.ind = iface;
|
||||||
|
parm.managed = 0;
|
||||||
|
parm.other = 0;
|
||||||
|
parm.found_context = 0;
|
||||||
|
parm.adv_router = 0;
|
||||||
|
parm.if_name = iface_name;
|
||||||
|
parm.first = 1;
|
||||||
|
parm.now = now;
|
||||||
|
parm.glob_pref_time = parm.link_pref_time = parm.ula_pref_time = 0;
|
||||||
|
parm.adv_interval = calc_interval(ra_param);
|
||||||
|
parm.prio = calc_prio(ra_param);
|
||||||
|
|
||||||
save_counter(0);
|
save_counter(0);
|
||||||
ra = expand(sizeof(struct ra_packet));
|
ra = expand(sizeof(struct ra_packet));
|
||||||
|
|
||||||
ra->type = ND_ROUTER_ADVERT;
|
ra->type = ND_ROUTER_ADVERT;
|
||||||
ra->code = 0;
|
ra->code = 0;
|
||||||
ra->hop_limit = hop_limit;
|
ra->hop_limit = hop_limit;
|
||||||
ra->flags = calc_prio(ra_param);
|
ra->flags = parm.prio;
|
||||||
ra->lifetime = htons(calc_lifetime(ra_param));
|
ra->lifetime = htons(calc_lifetime(ra_param));
|
||||||
ra->reachable_time = 0;
|
ra->reachable_time = 0;
|
||||||
ra->retrans_time = 0;
|
ra->retrans_time = 0;
|
||||||
|
|
||||||
parm.ind = iface;
|
|
||||||
parm.managed = 0;
|
|
||||||
parm.other = 0;
|
|
||||||
parm.found_context = 0;
|
|
||||||
parm.if_name = iface_name;
|
|
||||||
parm.first = 1;
|
|
||||||
parm.now = now;
|
|
||||||
parm.glob_pref_time = parm.link_pref_time = parm.ula_pref_time = 0;
|
|
||||||
parm.adv_interval = calc_interval(ra_param);
|
|
||||||
|
|
||||||
/* set tag with name == interface */
|
/* set tag with name == interface */
|
||||||
iface_id.net = iface_name;
|
iface_id.net = iface_name;
|
||||||
iface_id.next = NULL;
|
iface_id.next = NULL;
|
||||||
@@ -286,8 +288,7 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
|
|||||||
setaddr6part(&local, addr6part(&local) & ~((context->prefix == 64) ? (u64)-1LL : (1LLU << (128 - context->prefix)) - 1LLU));
|
setaddr6part(&local, addr6part(&local) & ~((context->prefix == 64) ? (u64)-1LL : (1LLU << (128 - context->prefix)) - 1LLU));
|
||||||
|
|
||||||
|
|
||||||
if ((context->flags &
|
if (context->flags & CONTEXT_RA)
|
||||||
(CONTEXT_RA_ONLY | CONTEXT_RA_NAME | CONTEXT_RA_STATELESS)))
|
|
||||||
{
|
{
|
||||||
do_slaac = 1;
|
do_slaac = 1;
|
||||||
if (context->flags & CONTEXT_DHCP)
|
if (context->flags & CONTEXT_DHCP)
|
||||||
@@ -339,6 +340,17 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
|
|||||||
if (!old_prefix && !parm.found_context)
|
if (!old_prefix && !parm.found_context)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* If we're sending router address instead of prefix in at least on prefix,
|
||||||
|
include the advertisement interval option. */
|
||||||
|
if (parm.adv_router)
|
||||||
|
{
|
||||||
|
put_opt6_char(ICMP6_OPT_ADV_INTERVAL);
|
||||||
|
put_opt6_char(1);
|
||||||
|
put_opt6_short(0);
|
||||||
|
/* interval value is in milliseconds */
|
||||||
|
put_opt6_long(1000 * calc_interval(find_iface_param(iface_name)));
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LINUX_NETWORK
|
#ifdef HAVE_LINUX_NETWORK
|
||||||
/* Note that IPv6 MTU is not necessarilly the same as the IPv4 MTU
|
/* Note that IPv6 MTU is not necessarilly the same as the IPv4 MTU
|
||||||
available from SIOCGIFMTU */
|
available from SIOCGIFMTU */
|
||||||
@@ -500,6 +512,7 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
int do_slaac = 0;
|
int do_slaac = 0;
|
||||||
int deprecate = 0;
|
int deprecate = 0;
|
||||||
int constructed = 0;
|
int constructed = 0;
|
||||||
|
int adv_router = 0;
|
||||||
unsigned int time = 0xffffffff;
|
unsigned int time = 0xffffffff;
|
||||||
struct dhcp_context *context;
|
struct dhcp_context *context;
|
||||||
|
|
||||||
@@ -511,8 +524,7 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
{
|
{
|
||||||
context->saved_valid = valid;
|
context->saved_valid = valid;
|
||||||
|
|
||||||
if ((context->flags &
|
if (context->flags & CONTEXT_RA)
|
||||||
(CONTEXT_RA_ONLY | CONTEXT_RA_NAME | CONTEXT_RA_STATELESS)))
|
|
||||||
{
|
{
|
||||||
do_slaac = 1;
|
do_slaac = 1;
|
||||||
if (context->flags & CONTEXT_DHCP)
|
if (context->flags & CONTEXT_DHCP)
|
||||||
@@ -531,6 +543,16 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
param->other = 1;
|
param->other = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Configured to advertise router address, not prefix. See RFC 3775 7.2
|
||||||
|
In this case we do all addresses associated with a context,
|
||||||
|
hence the real_prefix setting here. */
|
||||||
|
if (context->flags & CONTEXT_RA_ROUTER)
|
||||||
|
{
|
||||||
|
adv_router = 1;
|
||||||
|
param->adv_router = 1;
|
||||||
|
real_prefix = context->prefix;
|
||||||
|
}
|
||||||
|
|
||||||
/* find floor time, don't reduce below 3 * RA interval. */
|
/* find floor time, don't reduce below 3 * RA interval. */
|
||||||
if (time > context->lease_time)
|
if (time > context->lease_time)
|
||||||
{
|
{
|
||||||
@@ -556,7 +578,7 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
/* subsequent prefixes on the same interface
|
/* subsequent prefixes on the same interface
|
||||||
and subsequent instances of this prefix don't need timers.
|
and subsequent instances of this prefix don't need timers.
|
||||||
Be careful not to find the same prefix twice with different
|
Be careful not to find the same prefix twice with different
|
||||||
addresses. */
|
addresses unless we're advertising the actual addresses. */
|
||||||
if (!(context->flags & CONTEXT_RA_DONE))
|
if (!(context->flags & CONTEXT_RA_DONE))
|
||||||
{
|
{
|
||||||
if (!param->first)
|
if (!param->first)
|
||||||
@@ -607,13 +629,18 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
if ((opt = expand(sizeof(struct prefix_opt))))
|
if ((opt = expand(sizeof(struct prefix_opt))))
|
||||||
{
|
{
|
||||||
/* zero net part of address */
|
/* zero net part of address */
|
||||||
setaddr6part(local, addr6part(local) & ~((real_prefix == 64) ? (u64)-1LL : (1LLU << (128 - real_prefix)) - 1LLU));
|
if (!adv_router)
|
||||||
|
setaddr6part(local, addr6part(local) & ~((real_prefix == 64) ? (u64)-1LL : (1LLU << (128 - real_prefix)) - 1LLU));
|
||||||
|
|
||||||
opt->type = ICMP6_OPT_PREFIX;
|
opt->type = ICMP6_OPT_PREFIX;
|
||||||
opt->len = 4;
|
opt->len = 4;
|
||||||
opt->prefix_len = real_prefix;
|
opt->prefix_len = real_prefix;
|
||||||
/* autonomous only if we're not doing dhcp, always set "on-link" */
|
/* autonomous only if we're not doing dhcp, always set "on-link" */
|
||||||
opt->flags = do_slaac ? 0xC0 : 0x80;
|
opt->flags = 0x80;
|
||||||
|
if (do_slaac)
|
||||||
|
opt->flags |= 0x40;
|
||||||
|
if (adv_router)
|
||||||
|
opt->flags |= 0x20;
|
||||||
opt->valid_lifetime = htonl(valid);
|
opt->valid_lifetime = htonl(valid);
|
||||||
opt->preferred_lifetime = htonl(preferred);
|
opt->preferred_lifetime = htonl(preferred);
|
||||||
opt->reserved = 0;
|
opt->reserved = 0;
|
||||||
@@ -622,6 +649,32 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
inet_ntop(AF_INET6, local, daemon->addrbuff, ADDRSTRLEN);
|
inet_ntop(AF_INET6, local, daemon->addrbuff, ADDRSTRLEN);
|
||||||
if (!option_bool(OPT_QUIET_RA))
|
if (!option_bool(OPT_QUIET_RA))
|
||||||
my_syslog(MS_DHCP | LOG_INFO, "RTR-ADVERT(%s) %s", param->if_name, daemon->addrbuff);
|
my_syslog(MS_DHCP | LOG_INFO, "RTR-ADVERT(%s) %s", param->if_name, daemon->addrbuff);
|
||||||
|
|
||||||
|
/* Send Route Information option (RFC4191, 2.3) */
|
||||||
|
put_opt6_char(ICMP6_OPT_RT_INFO);
|
||||||
|
/* Length in units of 8 octets will be 1 (header) +
|
||||||
|
* 0, 1 or 2 (0...128 bits / 64 bit per unit) */
|
||||||
|
if (0 == prefix)
|
||||||
|
put_opt6_char(1);
|
||||||
|
else if (prefix < 65)
|
||||||
|
put_opt6_char(2);
|
||||||
|
else
|
||||||
|
put_opt6_char(3);
|
||||||
|
|
||||||
|
put_opt6_char(prefix);
|
||||||
|
/* Same priority and advertised prefix */
|
||||||
|
put_opt6_char(param->prio);
|
||||||
|
/* "valid lifetime" seems more reasonable than "preferred" */
|
||||||
|
put_opt6_long(valid);
|
||||||
|
/* Actual prefix, only necessary part
|
||||||
|
* Don't append any data in case of prefix length == 0 */
|
||||||
|
if (0 != prefix)
|
||||||
|
{
|
||||||
|
if (prefix < 65)
|
||||||
|
put_opt6((void *)local, 8);
|
||||||
|
else
|
||||||
|
put_opt6((void *)local, 16);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+169
@@ -0,0 +1,169 @@
|
|||||||
|
/* tables.c is Copyright (c) 2014 Sven Falempin All Rights Reserved.
|
||||||
|
|
||||||
|
Author's email: sfalempin@citypassenger.com
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 dated June, 1991, or
|
||||||
|
(at your option) version 3 dated 29 June, 2007.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dnsmasq.h"
|
||||||
|
|
||||||
|
#if defined(HAVE_IPSET) && defined(HAVE_BSD_NETWORK)
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <net/pfvar.h>
|
||||||
|
|
||||||
|
#include <err.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#define UNUSED(x) (void)(x)
|
||||||
|
|
||||||
|
static char *pf_device = "/dev/pf";
|
||||||
|
static int dev = -1;
|
||||||
|
|
||||||
|
static char *pfr_strerror(int errnum)
|
||||||
|
{
|
||||||
|
switch (errnum)
|
||||||
|
{
|
||||||
|
case ESRCH:
|
||||||
|
return "Table does not exist";
|
||||||
|
case ENOENT:
|
||||||
|
return "Anchor or Ruleset does not exist";
|
||||||
|
default:
|
||||||
|
return strerror(errnum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int pfr_add_tables(struct pfr_table *tbl, int size, int *nadd, int flags)
|
||||||
|
{
|
||||||
|
struct pfioc_table io;
|
||||||
|
|
||||||
|
if (size < 0 || (size && tbl == NULL))
|
||||||
|
{
|
||||||
|
errno = EINVAL;
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
bzero(&io, sizeof io);
|
||||||
|
io.pfrio_flags = flags;
|
||||||
|
io.pfrio_buffer = tbl;
|
||||||
|
io.pfrio_esize = sizeof(*tbl);
|
||||||
|
io.pfrio_size = size;
|
||||||
|
if (ioctl(dev, DIOCRADDTABLES, &io))
|
||||||
|
return (-1);
|
||||||
|
if (nadd != NULL)
|
||||||
|
*nadd = io.pfrio_nadd;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int fill_addr(const struct all_addr *ipaddr, int flags, struct pfr_addr* addr) {
|
||||||
|
if ( !addr || !ipaddr)
|
||||||
|
{
|
||||||
|
my_syslog(LOG_ERR, _("error: fill_addr missused"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
bzero(addr, sizeof(*addr));
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
if (flags & F_IPV6)
|
||||||
|
{
|
||||||
|
addr->pfra_af = AF_INET6;
|
||||||
|
addr->pfra_net = 0x80;
|
||||||
|
memcpy(&(addr->pfra_ip6addr), &(ipaddr->addr), sizeof(struct in6_addr));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
addr->pfra_af = AF_INET;
|
||||||
|
addr->pfra_net = 0x20;
|
||||||
|
addr->pfra_ip4addr.s_addr = ipaddr->addr.addr4.s_addr;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void ipset_init(void)
|
||||||
|
{
|
||||||
|
dev = open( pf_device, O_RDWR);
|
||||||
|
if (dev == -1)
|
||||||
|
{
|
||||||
|
err(1, "%s", pf_device);
|
||||||
|
die (_("failed to access pf devices: %s"), NULL, EC_MISC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int add_to_ipset(const char *setname, const struct all_addr *ipaddr,
|
||||||
|
int flags, int remove)
|
||||||
|
{
|
||||||
|
struct pfr_addr addr;
|
||||||
|
struct pfioc_table io;
|
||||||
|
struct pfr_table table;
|
||||||
|
int n = 0, rc = 0;
|
||||||
|
|
||||||
|
if ( dev == -1 )
|
||||||
|
{
|
||||||
|
my_syslog(LOG_ERR, _("warning: no opened pf devices %s"), pf_device);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bzero(&table, sizeof(struct pfr_table));
|
||||||
|
table.pfrt_flags |= PFR_TFLAG_PERSIST;
|
||||||
|
if ( strlen(setname) >= PF_TABLE_NAME_SIZE )
|
||||||
|
{
|
||||||
|
my_syslog(LOG_ERR, _("error: cannot use table name %s"), setname);
|
||||||
|
errno = ENAMETOOLONG;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( strlcpy(table.pfrt_name, setname,
|
||||||
|
sizeof(table.pfrt_name)) >= sizeof(table.pfrt_name))
|
||||||
|
{
|
||||||
|
my_syslog(LOG_ERR, _("error: cannot strlcpy table name %s"), setname);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rc = pfr_add_tables(&table, 1, &n, 0))
|
||||||
|
{
|
||||||
|
my_syslog(LOG_WARNING, _("warning: pfr_add_tables: %s(%d)"),
|
||||||
|
pfr_strerror(errno),rc);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
table.pfrt_flags &= ~PFR_TFLAG_PERSIST;
|
||||||
|
if (n)
|
||||||
|
my_syslog(LOG_INFO, _("info: table created"));
|
||||||
|
|
||||||
|
fill_addr(ipaddr,flags,&addr);
|
||||||
|
bzero(&io, sizeof(io));
|
||||||
|
io.pfrio_flags = 0;
|
||||||
|
io.pfrio_table = table;
|
||||||
|
io.pfrio_buffer = &addr;
|
||||||
|
io.pfrio_esize = sizeof(addr);
|
||||||
|
io.pfrio_size = 1;
|
||||||
|
if (ioctl(dev, ( remove ? DIOCRDELADDRS : DIOCRADDADDRS ), &io))
|
||||||
|
{
|
||||||
|
my_syslog(LOG_WARNING, _("warning: DIOCR%sADDRS: %s"), ( remove ? "DEL" : "ADD" ), pfr_strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
my_syslog(LOG_INFO, _("%d addresses %s"),
|
||||||
|
io.pfrio_nadd, ( remove ? "removed" : "added" ));
|
||||||
|
|
||||||
|
return io.pfrio_nadd;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
+44
@@ -81,6 +81,18 @@ unsigned short rand16(void)
|
|||||||
return (unsigned short) out[--outleft];
|
return (unsigned short) out[--outleft];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 rand32(void)
|
||||||
|
{
|
||||||
|
if (!outleft)
|
||||||
|
{
|
||||||
|
if (!++in[0]) if (!++in[1]) if (!++in[2]) ++in[3];
|
||||||
|
surf();
|
||||||
|
outleft = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
return out[--outleft];
|
||||||
|
}
|
||||||
|
|
||||||
u64 rand64(void)
|
u64 rand64(void)
|
||||||
{
|
{
|
||||||
static int outleft = 0;
|
static int outleft = 0;
|
||||||
@@ -319,6 +331,19 @@ time_t dnsmasq_time(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int netmask_length(struct in_addr mask)
|
||||||
|
{
|
||||||
|
int zero_count = 0;
|
||||||
|
|
||||||
|
while (0x0 == (mask.s_addr & 0x1) && zero_count < 32)
|
||||||
|
{
|
||||||
|
mask.s_addr >>= 1;
|
||||||
|
zero_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 32 - zero_count;
|
||||||
|
}
|
||||||
|
|
||||||
int is_same_net(struct in_addr a, struct in_addr b, struct in_addr mask)
|
int is_same_net(struct in_addr a, struct in_addr b, struct in_addr mask)
|
||||||
{
|
{
|
||||||
return (a.s_addr & mask.s_addr) == (b.s_addr & mask.s_addr);
|
return (a.s_addr & mask.s_addr) == (b.s_addr & mask.s_addr);
|
||||||
@@ -602,3 +627,22 @@ int wildcard_match(const char* wildcard, const char* match)
|
|||||||
|
|
||||||
return *wildcard == *match;
|
return *wildcard == *match;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The same but comparing a maximum of NUM characters, like strncmp. */
|
||||||
|
int wildcard_matchn(const char* wildcard, const char* match, int num)
|
||||||
|
{
|
||||||
|
while (*wildcard && *match && num)
|
||||||
|
{
|
||||||
|
if (*wildcard == '*')
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (*wildcard != *match)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
++wildcard;
|
||||||
|
++match;
|
||||||
|
--num;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (!num) || (*wildcard == *match);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user