summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG6
-rw-r--r--dnsmasq-rh.spec2
-rw-r--r--dnsmasq-suse.spec3
-rw-r--r--rpm/dnsmasq-SuSE.patch18
-rw-r--r--src/cache.c3
-rw-r--r--src/config.h2
-rw-r--r--src/isc.c3
-rw-r--r--src/lease.c3
-rw-r--r--src/rfc2131.c5
9 files changed, 25 insertions, 20 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b8cdbe8..653ef28 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1155,6 +1155,8 @@ version 2.12
Log types of incoming queries as well as source and domain.
Log NODATA replies generated as a result of the
- finlterwin2k option.
-
+ filterwin2k option.
+version 2.13
+ Fixed crash with un-named DHCP hosts introduced in 2.12.
+ Thanks to Nicolo Wojewoda and Gregory Gathy for bug reports.
diff --git a/dnsmasq-rh.spec b/dnsmasq-rh.spec
index bf3486a..a79e670 100644
--- a/dnsmasq-rh.spec
+++ b/dnsmasq-rh.spec
@@ -5,7 +5,7 @@
###############################################################################
Name: dnsmasq
-Version: 2.12
+Version: 2.13
Release: 1
Copyright: GPL
Group: System Environment/Daemons
diff --git a/dnsmasq-suse.spec b/dnsmasq-suse.spec
index 7d05868..887aa6b 100644
--- a/dnsmasq-suse.spec
+++ b/dnsmasq-suse.spec
@@ -5,7 +5,7 @@
###############################################################################
Name: dnsmasq
-Version: 2.12
+Version: 2.13
Release: 1
Copyright: GPL
Group: Productivity/Networking/DNS/Servers
@@ -103,6 +103,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc CHANGELOG COPYING FAQ doc.html setup.html UPGRADING_to_2.0 rpm/README.susefirewall
+%doc contrib
%config /etc/init.d/dnsmasq
%config /etc/dnsmasq.conf
/usr/sbin/rcdnsmasq
diff --git a/rpm/dnsmasq-SuSE.patch b/rpm/dnsmasq-SuSE.patch
index faf15e4..9982808 100644
--- a/rpm/dnsmasq-SuSE.patch
+++ b/rpm/dnsmasq-SuSE.patch
@@ -1,5 +1,5 @@
---- dnsmasq.8 2004-06-21 21:55:47.000000000 +0200
-+++ dnsmasq.8 2004-06-22 23:30:18.000000000 +0200
+--- dnsmasq.8 2004-08-08 20:57:56.000000000 +0200
++++ dnsmasq.8 2004-08-12 00:40:01.000000000 +0200
@@ -63,7 +63,7 @@
.TP
.B \-g, --group=<groupname>
@@ -9,9 +9,9 @@
/etc/ppp/resolv.conf which is not normally world readable.
.TP
.B \-v, --version
---- dnsmasq.conf.example 2004-05-26 12:59:56.000000000 +0200
-+++ dnsmasq.conf.example 2004-06-22 23:32:36.000000000 +0200
-@@ -62,7 +62,7 @@
+--- dnsmasq.conf.example 2004-08-08 21:18:26.000000000 +0200
++++ dnsmasq.conf.example 2004-08-12 00:40:01.000000000 +0200
+@@ -65,7 +65,7 @@
# You no longer (as of version 1.7) need to set these to enable
# dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the
@@ -20,9 +20,9 @@
#user=
#group=
---- src/config.h 2004-06-22 21:14:50.000000000 +0200
-+++ src/config.h 2004-06-22 23:31:46.000000000 +0200
-@@ -38,7 +38,7 @@
+--- src/config.h 2004-08-11 11:39:18.000000000 +0200
++++ src/config.h 2004-08-12 00:40:01.000000000 +0200
+@@ -44,7 +44,7 @@
#endif
#define DEFLEASE 3600 /* default lease time, 1 hour */
#define CHUSER "nobody"
@@ -31,7 +31,7 @@
#define IP6INTERFACES "/proc/net/if_inet6"
#define UPTIME "/proc/uptime"
#define DHCP_SERVER_PORT 67
-@@ -171,7 +171,7 @@
+@@ -176,7 +176,7 @@
/* platform independent options. */
#undef HAVE_BROKEN_RTC
diff --git a/src/cache.c b/src/cache.c
index ff672df..1419631 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -638,6 +638,9 @@ void cache_add_dhcp_entry(char *host_name, struct in_addr *host_address, time_t
struct crec *crec;
unsigned short flags = F_DHCP | F_FORWARD | F_IPV4 | F_REVERSE;
+ if (!host_name)
+ return;
+
if ((crec = cache_find_by_name(NULL, host_name, 0, F_IPV4)))
{
if (crec->flags & F_HOSTS)
diff --git a/src/config.h b/src/config.h
index 6b352cc..56bee83 100644
--- a/src/config.h
+++ b/src/config.h
@@ -12,7 +12,7 @@
/* Author's email: simon@thekelleys.org.uk */
-#define VERSION "2.12"
+#define VERSION "2.13"
#define FTABSIZ 150 /* max number of outstanding requests */
#define MAX_PROCS 20 /* max no children for TCP requests */
diff --git a/src/isc.c b/src/isc.c
index f96e9e3..203bcb1 100644
--- a/src/isc.c
+++ b/src/isc.c
@@ -235,8 +235,7 @@ void load_dhcp(char *file, char *suffix, time_t now, char *hostname)
for (lease = leases; lease; lease = lease->next)
{
- if (lease->fqdn)
- cache_add_dhcp_entry(lease->fqdn, &lease->addr, lease->expires);
+ cache_add_dhcp_entry(lease->fqdn, &lease->addr, lease->expires);
cache_add_dhcp_entry(lease->name, &lease->addr, lease->expires);
}
}
diff --git a/src/lease.c b/src/lease.c
index a5dd1c8..75bf0bf 100644
--- a/src/lease.c
+++ b/src/lease.c
@@ -175,8 +175,7 @@ void lease_update_dns(void)
for (lease = leases; lease; lease = lease->next)
{
- if (lease->fqdn)
- cache_add_dhcp_entry(lease->fqdn, &lease->addr, lease->expires);
+ cache_add_dhcp_entry(lease->fqdn, &lease->addr, lease->expires);
cache_add_dhcp_entry(lease->hostname, &lease->addr, lease->expires);
}
diff --git a/src/rfc2131.c b/src/rfc2131.c
index 7fb0d1a..e329b04 100644
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -89,7 +89,7 @@ int dhcp_reply(struct dhcp_context *context,
struct in_addr dhcp_next_server, struct in_addr router)
{
unsigned char *opt, *clid;
- struct dhcp_lease *lease;
+ struct dhcp_lease *lease, *ltmp;
struct dhcp_vendor *vendor;
int clid_len;
struct dhcp_packet *mess = &rawpacket->data;
@@ -352,7 +352,8 @@ int dhcp_reply(struct dhcp_context *context,
addr = option_addr(opt);
if (have_config(config, CONFIG_DISABLE))
message = "ignored";
- else if (have_config(config, CONFIG_ADDR) && !lease_find_by_addr(config->addr))
+ else if (have_config(config, CONFIG_ADDR) &&
+ (!(ltmp = lease_find_by_addr(config->addr)) || ltmp == lease))
mess->yiaddr = config->addr;
else if (lease && address_available(context, lease->addr))
mess->yiaddr = lease->addr;