From owner-freebsd-ports@freebsd.org Mon Feb 22 07:54:34 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96241AAF027 for ; Mon, 22 Feb 2016 07:54:34 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7BADF105D for ; Mon, 22 Feb 2016 07:54:34 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: by mailman.ysv.freebsd.org (Postfix) id 78008AAF025; Mon, 22 Feb 2016 07:54:34 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CADBAAF021 for ; Mon, 22 Feb 2016 07:54:34 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "asuka.mahoroba.org", Issuer "ca.mahoroba.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3C9105A; Mon, 22 Feb 2016 07:54:33 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ume@ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (user=ume mech=CRAM-MD5 bits=0) by mail.mahoroba.org (8.15.2/8.15.2) with ESMTPSA/inet6 id u1M7sIWU031699 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Mon, 22 Feb 2016 16:54:23 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Mon, 22 Feb 2016 16:54:18 +0900 Message-ID: From: Hajimu UMEMOTO To: bofh@FreeBSD.org Cc: ports@FreeBSD.org Subject: TCP_FASTOPEN is not available by default User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.5 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 10.3-BETA2 Cc: Hajimu UMEMOTO X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Mon_Feb_22_16:54:18_2016-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6a2 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Mon, 22 Feb 2016 16:54:23 +0900 (JST) X-Virus-Scanned: clamav-milter 0.99 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on asuka.mahoroba.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 07:54:34 -0000 --Multipart_Mon_Feb_22_16:54:18_2016-1 Content-Type: text/plain; charset=US-ASCII Hi, I was disturbed by the problem that the vboxwebsrv was not work on recent 10.2-STABLE. It didn't listen on any ports. The vboxwebsrv is shipped with Virtualbox and it provide a web interface. I tracked this problem down and found that the gsoap is trying to use TCP_FASTOPEN then failed. TCP_FASTOPEN was MFC'ed recently to stable/10 without enabling it in the kernel build by default. However, TCP_FASTOPEN is defined in tcp.h. So, the gsoap tries to use it then fail. I've attached the patch for workaround. It makes gsoap to ignore the error from setsockopt(TCP_FASTOPEN). Sincerely, --Multipart_Mon_Feb_22_16:54:18_2016-1 Content-Type: text/x-patch; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="gsoap-fastopen.diff" Content-Transfer-Encoding: 7bit Index: files/patch-gsoap_stdsoap2.c =================================================================== --- files/patch-gsoap_stdsoap2.c (revision 409317) +++ files/patch-gsoap_stdsoap2.c (working copy) @@ -1,6 +1,6 @@ --- gsoap/stdsoap2.c.orig 2015-12-07 03:15:27 UTC +++ gsoap/stdsoap2.c -@@ -5194,6 +5194,11 @@ soap_bind(struct soap *soap, const char +@@ -5194,10 +5194,17 @@ soap_bind(struct soap *soap, const char } #endif #ifdef TCP_FASTOPEN @@ -12,3 +12,9 @@ if (!(soap->omode & SOAP_IO_UDP) && setsockopt(soap->master, SOL_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_FASTOPEN failed in soap_bind()", SOAP_TCP_ERROR); ++#ifndef __FreeBSD__ + return SOAP_INVALID_SOCKET; ++#endif + } + #endif + #endif Index: files/patch-gsoap_stdsoap2.cpp =================================================================== --- files/patch-gsoap_stdsoap2.cpp (revision 409317) +++ files/patch-gsoap_stdsoap2.cpp (working copy) @@ -1,6 +1,6 @@ ---- gsoap/stdsoap2.cpp.orig 2016-01-01 16:24:55 UTC +--- gsoap/stdsoap2.cpp.orig 2015-12-07 03:15:27 UTC +++ gsoap/stdsoap2.cpp -@@ -5194,6 +5194,10 @@ soap_bind(struct soap *soap, const char +@@ -5194,10 +5194,16 @@ soap_bind(struct soap *soap, const char } #endif #ifdef TCP_FASTOPEN @@ -11,3 +11,9 @@ if (!(soap->omode & SOAP_IO_UDP) && setsockopt(soap->master, SOL_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_FASTOPEN failed in soap_bind()", SOAP_TCP_ERROR); ++#ifndef __FreeBSD__ + return SOAP_INVALID_SOCKET; ++#endif + } + #endif + #endif --Multipart_Mon_Feb_22_16:54:18_2016-1 Content-Type: text/plain; charset=US-ASCII -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ --Multipart_Mon_Feb_22_16:54:18_2016-1--