Update to latest dnsmasq-2.66rc5
Also Include fix for segfault when lease limit is reached Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
24df3be371
commit
16e329b64e
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ dnsmasq-2.52.tar.lzma
|
|||||||
/dnsmasq-2.64.tar.gz
|
/dnsmasq-2.64.tar.gz
|
||||||
/dnsmasq-2.65.tar.gz
|
/dnsmasq-2.65.tar.gz
|
||||||
/dnsmasq-2.66rc1.tar.gz
|
/dnsmasq-2.66rc1.tar.gz
|
||||||
|
/dnsmasq-2.66rc5.tar.gz
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
From 0b0a73c1c91bef3c2ab60a9563eac69a6b692a25 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon Kelley <simon@thekelleys.org.uk>
|
||||||
|
Date: Thu, 11 Apr 2013 14:07:02 +0100
|
||||||
|
Subject: [PATCH] Fix crash on exceeding DHCP lease limit.
|
||||||
|
|
||||||
|
---
|
||||||
|
CHANGELOG | 4 ++++
|
||||||
|
src/lease.c | 15 +++++++++++----
|
||||||
|
2 files changed, 15 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CHANGELOG b/CHANGELOG
|
||||||
|
index 212d412..b21f10a 100644
|
||||||
|
--- a/CHANGELOG
|
||||||
|
+++ b/CHANGELOG
|
||||||
|
@@ -58,6 +58,10 @@ version 2.66
|
||||||
|
Felker for the bug report.
|
||||||
|
|
||||||
|
Update Polish translation. Thanks to Jan Psota.
|
||||||
|
+
|
||||||
|
+ Fix crash if the configured DHCP lease limit is
|
||||||
|
+ reached. Regression occurred in 2.61. Thanks to Tsachi for
|
||||||
|
+ the bug report.
|
||||||
|
|
||||||
|
|
||||||
|
version 2.65
|
||||||
|
diff --git a/src/lease.c b/src/lease.c
|
||||||
|
index d30ae80..a4560ba 100644
|
||||||
|
--- a/src/lease.c
|
||||||
|
+++ b/src/lease.c
|
||||||
|
@@ -703,8 +703,11 @@ static struct dhcp_lease *lease_allocate(void)
|
||||||
|
struct dhcp_lease *lease4_allocate(struct in_addr addr)
|
||||||
|
{
|
||||||
|
struct dhcp_lease *lease = lease_allocate();
|
||||||
|
- lease->addr = addr;
|
||||||
|
- lease->hwaddr_len = 256; /* illegal value */
|
||||||
|
+ if (lease)
|
||||||
|
+ {
|
||||||
|
+ lease->addr = addr;
|
||||||
|
+ lease->hwaddr_len = 256; /* illegal value */
|
||||||
|
+ }
|
||||||
|
|
||||||
|
return lease;
|
||||||
|
}
|
||||||
|
@@ -713,8 +716,12 @@ struct dhcp_lease *lease4_allocate(struct in_addr addr)
|
||||||
|
struct dhcp_lease *lease6_allocate(struct in6_addr *addrp, int lease_type)
|
||||||
|
{
|
||||||
|
struct dhcp_lease *lease = lease_allocate();
|
||||||
|
- memcpy(lease->hwaddr, addrp, sizeof(*addrp)) ;
|
||||||
|
- lease->flags |= lease_type;
|
||||||
|
+
|
||||||
|
+ if (lease)
|
||||||
|
+ {
|
||||||
|
+ memcpy(lease->hwaddr, addrp, sizeof(*addrp)) ;
|
||||||
|
+ lease->flags |= lease_type;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
return lease;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
13
dnsmasq.spec
13
dnsmasq.spec
@ -6,12 +6,12 @@
|
|||||||
%endif
|
%endif
|
||||||
%if 0%{releasecandidate}
|
%if 0%{releasecandidate}
|
||||||
%define extrapath release-candidates/
|
%define extrapath release-candidates/
|
||||||
%define extraversion rc1
|
%define extraversion rc5
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: dnsmasq
|
Name: dnsmasq
|
||||||
Version: 2.66
|
Version: 2.66
|
||||||
Release: 1%{?extraversion}%{?dist}
|
Release: 1.%{?extraversion}%{?dist}
|
||||||
Summary: A lightweight DHCP/caching DNS server
|
Summary: A lightweight DHCP/caching DNS server
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -20,6 +20,9 @@ URL: http://www.thekelleys.org.uk/dnsmasq/
|
|||||||
Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.gz
|
Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.gz
|
||||||
Source1: %{name}.service
|
Source1: %{name}.service
|
||||||
|
|
||||||
|
# Upstream fix after dnsmasq-2.66rc5 - commit 56a1142f033234e3ee3b6361e9a1bcdbe606f816
|
||||||
|
Patch0: dnsmasq-2.66.rc5-Fix-crash-on-exceeding-DHCP-lease-limit.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: dbus-devel
|
BuildRequires: dbus-devel
|
||||||
@ -54,6 +57,8 @@ query/remove a DHCP server's leases.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{?extraversion}
|
%setup -q -n %{name}-%{version}%{?extraversion}
|
||||||
|
|
||||||
|
%patch0 -p1 -b .lease-limit
|
||||||
|
|
||||||
# use /var/lib/dnsmasq instead of /var/lib/misc
|
# use /var/lib/dnsmasq instead of /var/lib/misc
|
||||||
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
|
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
|
||||||
sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file"
|
sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file"
|
||||||
@ -133,6 +138,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/dhcp_*
|
%{_mandir}/man1/dhcp_*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 12 2013 Tomas Hozza <thozza@redhat.com> - 2.66-1.rc5
|
||||||
|
- Update to latest dnsmasq-2.66rc5
|
||||||
|
- Include fix for segfault when lease limit is reached
|
||||||
|
|
||||||
* Fri Mar 22 2013 Tomas Hozza <thozza@redhat.com> - 2.66-1.rc1
|
* Fri Mar 22 2013 Tomas Hozza <thozza@redhat.com> - 2.66-1.rc1
|
||||||
- Update to latest dnsmasq-2.66rc1
|
- Update to latest dnsmasq-2.66rc1
|
||||||
- Dropping unneeded patches
|
- Dropping unneeded patches
|
||||||
|
Loading…
Reference in New Issue
Block a user