mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-06 15:51:41 +00:00
Compare commits
6
Commits
v2.63
...
v2.64test2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12d71ed28c | ||
|
|
9fed0f71c2 | ||
|
|
2e34ac1403 | ||
|
|
bc54ae392b | ||
|
|
00acd06340 | ||
|
|
476e4a03c1 |
No files matched your search
@@ -1,3 +1,16 @@
|
|||||||
|
version 2.64
|
||||||
|
Handle DHCP FQDN options with all flag bits zero and
|
||||||
|
--dhcp-client-update set. Thanks to Bernd Krumbroeck for
|
||||||
|
spotting the problem.
|
||||||
|
|
||||||
|
Finesse the check for /etc/hosts names which conflict with
|
||||||
|
DHCP names. Previously a name/address pair in /etc/hosts
|
||||||
|
which didn't match the name/address of a DHCP lease would
|
||||||
|
generate a warning. Now that only happesn if there is not
|
||||||
|
also a match. This allows multiple addresses for a name in
|
||||||
|
/etc/hosts with one of them assigned via DHCP.
|
||||||
|
|
||||||
|
|
||||||
version 2.63
|
version 2.63
|
||||||
Do duplicate dhcp-host address check in --test mode.
|
Do duplicate dhcp-host address check in --test mode.
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -8,6 +8,8 @@
|
|||||||
# which has a set of references substituted into it by git.
|
# which has a set of references substituted into it by git.
|
||||||
# If we can find one which matches $v[0-9].* then we assume it's
|
# If we can find one which matches $v[0-9].* then we assume it's
|
||||||
# a version-number tag, else we just use the whole string.
|
# a version-number tag, else we just use the whole string.
|
||||||
|
# If there is more than one v[0-9].* tag, sort them and use the
|
||||||
|
# first. This favours, eg v2.63 over 2.63rc6.
|
||||||
|
|
||||||
if which git >/dev/null 2>&1 && [ -d $1/.git ]; then
|
if which git >/dev/null 2>&1 && [ -d $1/.git ]; then
|
||||||
cd $1; git describe
|
cd $1; git describe
|
||||||
@@ -18,7 +20,7 @@ else
|
|||||||
vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep $v[0-9]`
|
vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep $v[0-9]`
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "${vers}" | head -n 1 | sed 's/^v//'
|
echo "${vers}" | sort | head -n 1 | sed 's/^v//'
|
||||||
else
|
else
|
||||||
cat $1/VERSION
|
cat $1/VERSION
|
||||||
fi
|
fi
|
||||||
|
|||||||
Vendored
+16
@@ -1,3 +1,19 @@
|
|||||||
|
dnsmasq (2.64-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream.
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 28 Aug 2012 16:19:15 +0000
|
||||||
|
|
||||||
|
dnsmasq (2.63-2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Fix version script to report correct version.
|
||||||
|
* Unbotch move of dbus config file by using correct versions in
|
||||||
|
Replaces: and Breaks: lines. (closes: #685204)
|
||||||
|
* Create dnsmasq user in dnsmasq-base so that Dbus doesn't complain if
|
||||||
|
only dnsmasq-base is installed. (closes: #685987)
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 28 Aug 2012 16:18:35 +0000
|
||||||
|
|
||||||
dnsmasq (2.63-1) unstable; urgency=low
|
dnsmasq (2.63-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream.
|
* New upstream.
|
||||||
|
|||||||
Vendored
+2
-2
@@ -23,8 +23,8 @@ Description: Small caching DNS proxy and DHCP/TFTP server
|
|||||||
Package: dnsmasq-base
|
Package: dnsmasq-base
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}
|
Depends: ${shlibs:Depends}
|
||||||
Breaks: dnsmasq (<< 2.62-3)
|
Breaks: dnsmasq (<< 2.63-1~)
|
||||||
Replaces: dnsmasq (<< 2.62-3)
|
Replaces: dnsmasq (<< 2.63-1~)
|
||||||
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
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Create the dnsmasq user in dnsmasq-base, so that Dbus doesn't complain.
|
||||||
|
|
||||||
|
# create a user to run as (code stolen from dovecot-common)
|
||||||
|
if [ "$1" = "configure" ]; then
|
||||||
|
if [ -z "`id -u dnsmasq 2> /dev/null`" ]; then
|
||||||
|
adduser --system --home /var/lib/misc --gecos "dnsmasq" \
|
||||||
|
--no-create-home --disabled-password \
|
||||||
|
--quiet dnsmasq || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make the directory where we keep the pid file - this
|
||||||
|
# has to be owned by "dnsmasq" so that the file can be unlinked.
|
||||||
|
# This is only actually used by the dnsmasq binary package, not
|
||||||
|
# dnsmasq-base, but it's much easier to create it here so that
|
||||||
|
# we don't have synchronisation issues with the creation of the
|
||||||
|
# dnsmasq user.
|
||||||
|
if [ ! -d /var/run/dnsmasq ]; then
|
||||||
|
mkdir /var/run/dnsmasq
|
||||||
|
chown dnsmasq:nogroup /var/run/dnsmasq
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Vendored
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ purge = "$1" ]; then
|
||||||
|
if [ -x "$(command -v deluser)" ]; then
|
||||||
|
deluser --quiet --system dnsmasq > /dev/null || true
|
||||||
|
else
|
||||||
|
echo >&2 "not removing dnsmasq system account because deluser command was not found"
|
||||||
|
fi
|
||||||
|
rm -rf /var/run/dnsmasq
|
||||||
|
fi
|
||||||
Vendored
-27
@@ -1,27 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# create a user to run as (code stolen from dovecot-common)
|
|
||||||
if [ "$1" = "configure" ]; then
|
|
||||||
if [ -z "`id -u dnsmasq 2> /dev/null`" ]; then
|
|
||||||
adduser --system --home /var/lib/misc --gecos "dnsmasq" \
|
|
||||||
--no-create-home --disabled-password \
|
|
||||||
--quiet dnsmasq || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make the directory where we keep the pid file - this
|
|
||||||
# has to be owned by "dnsmasq" do that the file can be unlinked.
|
|
||||||
if [ ! -d /var/run/dnsmasq ]; then
|
|
||||||
mkdir /var/run/dnsmasq
|
|
||||||
chown dnsmasq:nogroup /var/run/dnsmasq
|
|
||||||
fi
|
|
||||||
|
|
||||||
# handle new location of pidfile during an upgrade
|
|
||||||
if [ -e /var/run/dnsmasq.pid ]; then
|
|
||||||
mv /var/run/dnsmasq.pid /var/run/dnsmasq
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -40,10 +19,4 @@ if [ -x /etc/init.d/dnsmasq ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# dpkg can botch the change of /usr/share/doc/dnsmasq from
|
|
||||||
# directory to symlink. Fix up here.
|
|
||||||
if [ ! -h /usr/share/doc/dnsmasq ] && { rmdir /usr/share/doc/dnsmasq; }; then
|
|
||||||
cd /usr/share/doc/
|
|
||||||
ln -s /usr/share/doc/dnsmasq-base dnsmasq
|
|
||||||
fi
|
|
||||||
|
|
||||||
Vendored
-6
@@ -3,10 +3,4 @@ set -e
|
|||||||
|
|
||||||
if [ purge = "$1" ]; then
|
if [ purge = "$1" ]; then
|
||||||
update-rc.d dnsmasq remove >/dev/null
|
update-rc.d dnsmasq remove >/dev/null
|
||||||
if [ -x "$(command -v deluser)" ]; then
|
|
||||||
deluser --quiet --system dnsmasq > /dev/null || true
|
|
||||||
else
|
|
||||||
echo >&2 "not removing dnsmasq system account because deluser command was not found"
|
|
||||||
fi
|
|
||||||
rm -rf /var/run/dnsmasq
|
|
||||||
fi
|
fi
|
||||||
Vendored
+2
@@ -129,6 +129,8 @@ ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
|
|||||||
gzip -9 debian/base/usr/share/doc/$(package)/DBus-interface
|
gzip -9 debian/base/usr/share/doc/$(package)/DBus-interface
|
||||||
endif
|
endif
|
||||||
install -m 644 debian/dnsmasq-base.conffiles debian/base/DEBIAN/conffiles
|
install -m 644 debian/dnsmasq-base.conffiles debian/base/DEBIAN/conffiles
|
||||||
|
install -m 755 debian/dnsmasq-base.postinst debian/base/DEBIAN/postinst
|
||||||
|
install -m 755 debian/dnsmasq-base.postrm debian/base/DEBIAN/postrm
|
||||||
install -m 644 debian/changelog debian/base/usr/share/doc/$(package)/changelog.Debian
|
install -m 644 debian/changelog debian/base/usr/share/doc/$(package)/changelog.Debian
|
||||||
gzip -9 debian/base/usr/share/doc/$(package)/changelog.Debian
|
gzip -9 debian/base/usr/share/doc/$(package)/changelog.Debian
|
||||||
install -m 644 debian/readme debian/base/usr/share/doc/$(package)/README.Debian
|
install -m 644 debian/readme debian/base/usr/share/doc/$(package)/README.Debian
|
||||||
|
|||||||
+20
-14
@@ -1042,7 +1042,7 @@ static void add_dhcp_cname(struct crec *target, time_t ttd)
|
|||||||
void cache_add_dhcp_entry(char *host_name, int prot,
|
void cache_add_dhcp_entry(char *host_name, int prot,
|
||||||
struct all_addr *host_address, time_t ttd)
|
struct all_addr *host_address, time_t ttd)
|
||||||
{
|
{
|
||||||
struct crec *crec = NULL;
|
struct crec *crec = NULL, *fail_crec = NULL;
|
||||||
unsigned short flags = F_IPV4;
|
unsigned short flags = F_IPV4;
|
||||||
int in_hosts = 0;
|
int in_hosts = 0;
|
||||||
size_t addrlen = sizeof(struct in_addr);
|
size_t addrlen = sizeof(struct in_addr);
|
||||||
@@ -1055,28 +1055,21 @@ void cache_add_dhcp_entry(char *host_name, int prot,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inet_ntop(prot, host_address, daemon->addrbuff, ADDRSTRLEN);
|
||||||
|
|
||||||
while ((crec = cache_find_by_name(crec, host_name, 0, flags | F_CNAME)))
|
while ((crec = cache_find_by_name(crec, host_name, 0, flags | F_CNAME)))
|
||||||
{
|
{
|
||||||
/* check all addresses associated with name */
|
/* check all addresses associated with name */
|
||||||
if (crec->flags & F_HOSTS)
|
if (crec->flags & F_HOSTS)
|
||||||
{
|
{
|
||||||
/* if in hosts, don't need DHCP record */
|
|
||||||
in_hosts = 1;
|
|
||||||
|
|
||||||
inet_ntop(prot, host_address, daemon->addrbuff, ADDRSTRLEN);
|
|
||||||
if (crec->flags & F_CNAME)
|
if (crec->flags & F_CNAME)
|
||||||
my_syslog(MS_DHCP | LOG_WARNING,
|
my_syslog(MS_DHCP | LOG_WARNING,
|
||||||
_("%s is a CNAME, not giving it to the DHCP lease of %s"),
|
_("%s is a CNAME, not giving it to the DHCP lease of %s"),
|
||||||
host_name, daemon->addrbuff);
|
host_name, daemon->addrbuff);
|
||||||
else if (memcmp(&crec->addr.addr, host_address, addrlen) != 0)
|
else if (memcmp(&crec->addr.addr, host_address, addrlen) == 0)
|
||||||
{
|
in_hosts = 1;
|
||||||
inet_ntop(prot, &crec->addr.addr, daemon->namebuff, MAXDNAME);
|
else
|
||||||
my_syslog(MS_DHCP | LOG_WARNING,
|
fail_crec = crec;
|
||||||
_("not giving name %s to the DHCP lease of %s because "
|
|
||||||
"the name exists in %s with address %s"),
|
|
||||||
host_name, daemon->addrbuff,
|
|
||||||
record_source(crec->uid), daemon->namebuff);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!(crec->flags & F_DHCP))
|
else if (!(crec->flags & F_DHCP))
|
||||||
{
|
{
|
||||||
@@ -1086,9 +1079,22 @@ void cache_add_dhcp_entry(char *host_name, int prot,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if in hosts, don't need DHCP record */
|
||||||
if (in_hosts)
|
if (in_hosts)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* Name in hosts, address doesn't match */
|
||||||
|
if (fail_crec)
|
||||||
|
{
|
||||||
|
inet_ntop(prot, &fail_crec->addr.addr, daemon->namebuff, MAXDNAME);
|
||||||
|
my_syslog(MS_DHCP | LOG_WARNING,
|
||||||
|
_("not giving name %s to the DHCP lease of %s because "
|
||||||
|
"the name exists in %s with address %s"),
|
||||||
|
host_name, daemon->addrbuff,
|
||||||
|
record_source(fail_crec->uid), daemon->namebuff);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((crec = cache_find_by_addr(NULL, (struct all_addr *)host_address, 0, flags)))
|
if ((crec = cache_find_by_addr(NULL, (struct all_addr *)host_address, 0, flags)))
|
||||||
{
|
{
|
||||||
if (crec->flags & F_NEG)
|
if (crec->flags & F_NEG)
|
||||||
|
|||||||
+17
-6
@@ -515,11 +515,22 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
|||||||
op += 3;
|
op += 3;
|
||||||
pp = op;
|
pp = op;
|
||||||
|
|
||||||
/* Always force update, since the client has no way to do it itself. */
|
/* NB, the following always sets at least one bit */
|
||||||
if (!option_bool(OPT_FQDN_UPDATE) && !(fqdn_flags & 0x01))
|
if (option_bool(OPT_FQDN_UPDATE))
|
||||||
fqdn_flags |= 0x03;
|
{
|
||||||
|
if (fqdn_flags & 0x01)
|
||||||
fqdn_flags &= ~0x08;
|
{
|
||||||
|
fqdn_flags |= 0x02; /* set O */
|
||||||
|
fqdn_flags &= ~0x01; /* clear S */
|
||||||
|
}
|
||||||
|
fqdn_flags |= 0x08; /* set N */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(fqdn_flags & 0x01))
|
||||||
|
fqdn_flags |= 0x03; /* set S and O */
|
||||||
|
fqdn_flags &= ~0x08; /* clear N */
|
||||||
|
}
|
||||||
|
|
||||||
if (fqdn_flags & 0x04)
|
if (fqdn_flags & 0x04)
|
||||||
while (*op != 0 && ((op + (*op) + 1) - pp) < len)
|
while (*op != 0 && ((op + (*op) + 1) - pp) < len)
|
||||||
@@ -2261,7 +2272,7 @@ static void do_options(struct dhcp_context *context,
|
|||||||
|
|
||||||
if ((p = free_space(mess, end, OPTION_CLIENT_FQDN, len)))
|
if ((p = free_space(mess, end, OPTION_CLIENT_FQDN, len)))
|
||||||
{
|
{
|
||||||
*(p++) = fqdn_flags;
|
*(p++) = fqdn_flags & 0x0f; /* MBZ bits to zero */
|
||||||
*(p++) = 255;
|
*(p++) = 255;
|
||||||
*(p++) = 255;
|
*(p++) = 255;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user