summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2015-01-19 14:08:32 +0000
committerTim Harder <radhermit@gentoo.org>2015-01-19 14:08:32 +0000
commit21315b117cbab49a0f6099c85a0ebb9fe06c94d4 (patch)
treecc69efa4c226292646b5f506dc19c01502934aba /net-dns
parentStable on ppc, ppc64 and x86. Bug #530688. (diff)
downloadgentoo-2-21315b117cbab49a0f6099c85a0ebb9fe06c94d4.tar.gz
gentoo-2-21315b117cbab49a0f6099c85a0ebb9fe06c94d4.tar.bz2
gentoo-2-21315b117cbab49a0f6099c85a0ebb9fe06c94d4.zip
Use upstream patch for 3.14 LTS issue.
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/unbound/ChangeLog9
-rw-r--r--net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch72
-rw-r--r--net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch35
-rw-r--r--net-dns/unbound/unbound-1.5.1-r2.ebuild (renamed from net-dns/unbound/unbound-1.5.1-r1.ebuild)6
4 files changed, 83 insertions, 39 deletions
diff --git a/net-dns/unbound/ChangeLog b/net-dns/unbound/ChangeLog
index 18b1d3311b0f..8cea540e5706 100644
--- a/net-dns/unbound/ChangeLog
+++ b/net-dns/unbound/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-dns/unbound
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/ChangeLog,v 1.85 2015/01/15 08:39:46 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/ChangeLog,v 1.86 2015/01/19 14:08:32 radhermit Exp $
+
+*unbound-1.5.1-r2 (19 Jan 2015)
+
+ 19 Jan 2015; Tim Harder <radhermit@gentoo.org> -unbound-1.5.1-r1.ebuild,
+ +unbound-1.5.1-r2.ebuild, -files/unbound-1.5.1-pmtudisc.patch,
+ +files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch:
+ Use upstream patch for 3.14 LTS issue.
15 Jan 2015; Agostino Sarubbo <ago@gentoo.org> unbound-1.4.22-r1.ebuild:
Stable for ppc, wrt bug #536226
diff --git a/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch b/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch
new file mode 100644
index 000000000000..c1be28cbc0db
--- /dev/null
+++ b/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch
@@ -0,0 +1,72 @@
+From 858da540f70a4411ad8fbe7144cef6ce9da18f89 Mon Sep 17 00:00:00 2001
+From: wouter <wouter@be551aaa-1e26-0410-a405-d3ace91eadb9>
+Date: Mon, 5 Jan 2015 13:51:22 +0000
+Subject: [PATCH] - Fix #634: fix fail to start on Linux LTS 3.14.X, ignores
+ missing IP_MTU_DISCOVER OMIT option.
+
+--- a/services/listen_dnsport.c
++++ b/services/listen_dnsport.c
+@@ -368,29 +368,47 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
+ * (and also uses the interface mtu to determine the size of the packets).
+ * So there won't be any EMSGSIZE error. Against DNS fragmentation attacks.
+ * FreeBSD already has same semantics without setting the option. */
+-# if defined(IP_PMTUDISC_OMIT)
+- int action = IP_PMTUDISC_OMIT;
+-# else
+- int action = IP_PMTUDISC_DONT;
+-# endif
++ int omit_set = 0;
++ int action;
++# if defined(IP_PMTUDISC_OMIT)
++ action = IP_PMTUDISC_OMIT;
+ if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
+ &action, (socklen_t)sizeof(action)) < 0) {
+- log_err("setsockopt(..., IP_MTU_DISCOVER, "
+-# if defined(IP_PMTUDISC_OMIT)
+- "IP_PMTUDISC_OMIT"
++
++ if (errno != EINVAL) {
++ log_err("setsockopt(..., IP_MTU_DISCOVER, IP_PMTUDISC_OMIT...) failed: %s",
++ strerror(errno));
++
++# ifndef USE_WINSOCK
++ close(s);
+ # else
+- "IP_PMTUDISC_DONT"
++ closesocket(s);
+ # endif
+- "...) failed: %s",
+- strerror(errno));
++ *noproto = 0;
++ *inuse = 0;
++ return -1;
++ }
++ }
++ else
++ {
++ omit_set = 1;
++ }
++# endif
++ if (omit_set == 0) {
++ action = IP_PMTUDISC_DONT;
++ if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
++ &action, (socklen_t)sizeof(action)) < 0) {
++ log_err("setsockopt(..., IP_MTU_DISCOVER, IP_PMTUDISC_DONT...) failed: %s",
++ strerror(errno));
+ # ifndef USE_WINSOCK
+- close(s);
++ close(s);
+ # else
+- closesocket(s);
++ closesocket(s);
+ # endif
+- *noproto = 0;
+- *inuse = 0;
+- return -1;
++ *noproto = 0;
++ *inuse = 0;
++ return -1;
++ }
+ }
+ # elif defined(IP_DONTFRAG)
+ int off = 0;
diff --git a/net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch b/net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch
deleted file mode 100644
index fb24734d0f2b..000000000000
--- a/net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -ru unbound-1.5.1-orig/services/listen_dnsport.c unbound-1.5.1/services/listen_dnsport.c
---- unbound-1.5.1-orig/services/listen_dnsport.c 2014-09-16 15:49:21.000000000 +0200
-+++ unbound-1.5.1/services/listen_dnsport.c 2014-12-21 08:15:39.126734451 +0100
-@@ -361,6 +361,7 @@
- }
- # endif /* IPv6 MTU */
- } else if(family == AF_INET) {
-+ int omit = 0;
- # if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
- /* linux 3.15 has IP_PMTUDISC_OMIT, Hannes Frederic Sowa made it so that
- * PMTU information is not accepted, but fragmentation is allowed
-@@ -373,8 +374,11 @@
- # else
- int action = IP_PMTUDISC_DONT;
- # endif
-+blahblah:
- if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
- &action, (socklen_t)sizeof(action)) < 0) {
-+ omit++;
-+ if (errno != EINVAL) {
- log_err("setsockopt(..., IP_MTU_DISCOVER, "
- # if defined(IP_PMTUDISC_OMIT)
- "IP_PMTUDISC_OMIT"
-@@ -391,6 +395,11 @@
- *noproto = 0;
- *inuse = 0;
- return -1;
-+ }}
-+ if (omit == 1) {
-+ omit++;
-+ action = IP_PMTUDISC_DONT;
-+ goto blahblah;
- }
- # elif defined(IP_DONTFRAG)
- int off = 0;
diff --git a/net-dns/unbound/unbound-1.5.1-r1.ebuild b/net-dns/unbound/unbound-1.5.1-r2.ebuild
index f2c751084214..66a0c0ef7705 100644
--- a/net-dns/unbound/unbound-1.5.1-r1.ebuild
+++ b/net-dns/unbound/unbound-1.5.1-r2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/unbound-1.5.1-r1.ebuild,v 1.1 2014/12/21 07:17:57 zx2c4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/unbound-1.5.1-r2.ebuild,v 1.1 2015/01/19 14:08:32 radhermit Exp $
EAPI=5
PYTHON_COMPAT=( python2_7 )
@@ -63,7 +63,7 @@ src_prepare() {
# [23109:0] error: Could not open autotrust file for writing,
# /etc/dnssec/root-anchors.txt: Permission denied
epatch "${FILESDIR}"/${PN}-1.4.12-gentoo.patch
- epatch "${FILESDIR}"/${PN}-1.5.1-pmtudisc.patch
+ epatch "${FILESDIR}"/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch
# required for the python part
multilib_copy_sources