Hi Andreas,

On 31/05/17 11:36, A. Schulze via Unbound-users wrote:
> 
> A. Schulze via Unbound-users:
> 
>> On a plattform with broken TCP FASTOPEN support (even if not supported
>> by the kernel)
>> I currently cant disable it, I would need an other unbound binary -
>> right?
> 
> is there really no option to disable TCP_FASTOPEN usage by configuration?
> clarification is appreciated.

There is only a configure time option and not a config option.  We don't
want it to be a config option, we want it to work all the time.   Below
is a patch, but I don't know if it works, it makes the code fallthrough
to try normal TCP writes when FASTOPEN writes fail.

Best regards, Wouter

> 
> Andreas
> 

Index: util/netevent.c
===================================================================
--- util/netevent.c     (revision 4200)
+++ util/netevent.c     (working copy)
@@ -1407,12 +1407,15 @@
                        if(errno == EINTR || errno == EAGAIN)
                                return 1;
                        /* Not handling EISCONN here as shouldn't ever hit that 
case.*/
-                       if(errno != 0 && verbosity < 2)
+                       if(errno != EPIPE && errno != 0 && verbosity < 2)
                                return 0; /* silence lots of chatter in the 
logs */
-                       else if(errno != 0)
+                       if(errno != EPIPE && errno != 0) {
                                log_err_addr("tcp sendmsg", strerror(errno),
                                        &c->repinfo.addr, c->repinfo.addrlen);
-                       return 0;
+                               return 0;
+                       }
+                       /* fallthrough to nonFASTOPEN
+                        * (MSG_FASTOPEN on Linux 3 produces EPIPE) */
                } else {
                        c->tcp_byte_count += r;
                        if(c->tcp_byte_count < sizeof(uint16_t))

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to