[packages/unbound] missing patch added

jajcus jajcus at pld-linux.org
Thu Dec 18 10:59:56 CET 2014


commit 43c09d6d7b4b9a16fa767020493e5533c46399f3
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Dec 18 10:59:40 2014 +0100

    missing patch added

 unbound-IP_PMTUDISC_OMIT.patch | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
---
diff --git a/unbound-IP_PMTUDISC_OMIT.patch b/unbound-IP_PMTUDISC_OMIT.patch
new file mode 100644
index 0000000..dfe71db
--- /dev/null
+++ b/unbound-IP_PMTUDISC_OMIT.patch
@@ -0,0 +1,33 @@
+diff -dur 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-18 10:37:55.000000000 +0100
+@@ -368,19 +368,20 @@
+  * (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. */
++                int action, result = -1;
+ #    if defined(IP_PMTUDISC_OMIT)
+-		int action = IP_PMTUDISC_OMIT;
+-#    else
+-		int action = IP_PMTUDISC_DONT;
++		action = IP_PMTUDISC_OMIT;
++		result = setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
++					&action, (socklen_t)sizeof(action));
+ #    endif
+-		if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, 
+-			&action, (socklen_t)sizeof(action)) < 0) {
++		if (result < 0) {
++			action = IP_PMTUDISC_DONT;
++			result = setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
++					&action, (socklen_t)sizeof(action));
++		}
++		if (result < 0) {
+ 			log_err("setsockopt(..., IP_MTU_DISCOVER, "
+-#    if defined(IP_PMTUDISC_OMIT)
+-				"IP_PMTUDISC_OMIT"
+-#    else
+ 				"IP_PMTUDISC_DONT"
+-#    endif
+ 				"...) failed: %s",
+ 				strerror(errno));
+ #    ifndef USE_WINSOCK
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/unbound.git/commitdiff/43c09d6d7b4b9a16fa767020493e5533c46399f3



More information about the pld-cvs-commit mailing list