update to 2.67test13

- use .tar.xz upstream archives

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2013-09-12 10:56:50 +02:00
parent b6153d9e1e
commit 2f4ab38b51
4 changed files with 10 additions and 72 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ dnsmasq-2.52.tar.lzma
/dnsmasq-2.66.tar.gz
/dnsmasq-2.67test4.tar.gz
/dnsmasq-2.67test7.tar.gz
/dnsmasq-2.67test13.tar.xz

View File

@ -1,63 +0,0 @@
From ffbad34b310ab2db6a686c85f5c0a0e52c0680c8 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 14 Aug 2013 15:53:57 +0100
Subject: [PATCH] Set SOREUSEADDR as well as SOREUSEPORT on DHCP sockets when
both available.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
---
src/dhcp.c | 8 ++++----
src/dhcp6.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/dhcp.c b/src/dhcp.c
index 333a327..b95a4ba 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -70,15 +70,15 @@ static int make_fd(int port)
support it. This handles the introduction of REUSEPORT on Linux. */
if (option_bool(OPT_NOWILD) || option_bool(OPT_CLEVERBIND))
{
- int rc = -1, porterr = 0;
+ int rc = 0;
#ifdef SO_REUSEPORT
if ((rc = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &oneopt, sizeof(oneopt))) == -1 &&
- errno != ENOPROTOOPT)
- porterr = 1;
+ errno == ENOPROTOOPT)
+ rc = 0;
#endif
- if (rc == -1 && !porterr)
+ if (rc != -1)
rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &oneopt, sizeof(oneopt));
if (rc == -1)
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 17e03e5..89af7dd 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -55,15 +55,15 @@ void dhcp6_init(void)
support it. This handles the introduction of REUSEPORT on Linux. */
if (option_bool(OPT_NOWILD) || option_bool(OPT_CLEVERBIND))
{
- int rc = -1, porterr = 0;
+ int rc = 0;
#ifdef SO_REUSEPORT
if ((rc = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &oneopt, sizeof(oneopt))) == -1 &&
- errno != ENOPROTOOPT)
- porterr = 1;
+ errno == ENOPROTOOPT)
+ rc = 0;
#endif
- if (rc == -1 && !porterr)
+ if (rc != -1)
rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &oneopt, sizeof(oneopt));
if (rc == -1)
--
1.8.3.1

View File

@ -2,7 +2,7 @@
%define releasecandidate 0
%if 0%{testrelease}
%define extrapath test-releases/
%define extraversion test7
%define extraversion test13
%endif
%if 0%{releasecandidate}
%define extrapath release-candidates/
@ -13,18 +13,16 @@
Name: dnsmasq
Version: 2.67
Release: 0.6.%{?extraversion}%{?dist}
Release: 0.7.%{?extraversion}%{?dist}
Summary: A lightweight DHCP/caching DNS server
Group: System Environment/Daemons
License: GPLv2
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.xz
Source1: %{name}.service
# commit ffbad34b310ab2db6a686c85f5c0a0e52c0680c8
Patch0: %{name}-2.66-Set-SOREUSEADDR-as-well-as-SOREUSEPORT-on-DHCP-socke.patch
# Patches
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -60,8 +58,6 @@ query/remove a DHCP server's leases.
%prep
%setup -q -n %{name}-%{version}%{?extraversion}
%patch0 -p1 -b .reuseport
# 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
sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file"
@ -141,6 +137,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/dhcp_*
%changelog
* Thu Sep 12 2013 Tomas Hozza <thozza@redhat.com> - 2.67-0.7.test13
- update to 2.67test13
- use .tar.xz upstream archives
* Thu Aug 15 2013 Tomas Hozza <thozza@redhat.com> - 2.67-0.6.test7
- Use SO_REUSEPORT and SO_REUSEADDR if possible for DHCPv4/6 (#981973)

View File

@ -1 +1 @@
88f0652170247a9bae97177e075ccc43 dnsmasq-2.67test7.tar.gz
c9fe55d74cdb7886f611a0cafd98b346 dnsmasq-2.67test13.tar.xz