import of dnsmasq-2.13.tar.gz

This commit is contained in:
Simon Kelley
2004-08-13 21:13:03 +01:00
parent c1bb85048b
commit 9c74ec03ca
9 changed files with 25 additions and 20 deletions

View File

@@ -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.

View File

@@ -5,7 +5,7 @@
###############################################################################
Name: dnsmasq
Version: 2.12
Version: 2.13
Release: 1
Copyright: GPL
Group: System Environment/Daemons

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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 */

View File

@@ -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);
}
}

View File

@@ -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);
}

View File

@@ -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;