zx2c4       14/12/21 07:17:57

  Added:                unbound-1.5.1-pmtudisc.patch
  Log:
  Fix breakage on 3.14 LTS kernels.
  
  (Portage version: 2.2.15/cvs/Linux x86_64, RepoMan options: --force, signed 
Manifest commit with key A5DE03AE)

Revision  Changes    Path
1.1                  net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/unbound/files/unbound-1.5.1-pmtudisc.patch?rev=1.1&content-type=text/plain

Index: unbound-1.5.1-pmtudisc.patch
===================================================================
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;




Reply via email to