From owner-freebsd-hackers Sun Jan 21 10:18:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by hub.freebsd.org (Postfix) with ESMTP id 504C137B400; Sun, 21 Jan 2001 10:18:00 -0800 (PST) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by mail.imp.ch (8.11.1/8.11.1) with ESMTP id f0LIHwa85133; Sun, 21 Jan 2001 19:17:59 +0100 (CET) (envelope-from Martin.Blapp@imp.ch) Date: Sun, 21 Jan 2001 19:24:15 +0100 (CET) From: Martin Blapp To: freebsd-hackers@freebsd.org Cc: Adrian Chadd Subject: RE: linux_connect() is broken Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Also have a look at: http://www.FreeBSD.org/cgi/cvsweb.cgi/syssrc/sys/compat/ linux/common/linux_socket.c?rev=1.21.2.2 &content-type=text/x-cvsweb-markup&cvsroot=netbsd (Add these three lines together) There is a comment form linux_connect(): */ * We should only let this call succeed once per * non-blocking connect; however we don't have * a convenient place to keep that state.. */ But - that's happening now exactly with patch1 (also included below) kernel: LINUX: linux_connect( s(36), name(2ac40590), namelen(16) )=0; kernel: LINUX: linux_send( s(36), buf(bc1fead0), len(30), flags(00000000) )=0; kernel: LINUX: linux_to_bsd_msg_flags( ret_flags(00000000) ); kernel: LINUX: linux_to_bsd_msg_flags( flags(00000000) ); kernel: LINUX: linux_recvfrom( s(36), buf(bc1ff768), len(1024), flags(00000000), from(bc1fe89c), fromlenaddr(bc1fe884) )=0; kernel: LINUX: linux_socket( protocol(0), type(1), domain(2) )=0; kernel: LINUX: linux_connect( s(36), name(08536880), namelen(16) )=36; kernel: LINUX: linux_connect( s(36), name(085368d8), namelen(16) )=56; First connect() succeeds, second gets EINPROGRESS, third gets EISCONN and Staroffice works as it should with this patch. --- sys/compat/linux/linux_socket.c Sun Jan 21 03:10:45 2001 +++ sys/compat/linux/linux_socket.c Sun Jan 21 02:59:44 2001 @@ -454,7 +454,7 @@ return (error); p->p_retval[0] = stat; - return (0); + return (EISCONN); } } Martin Martin Blapp, mb@imp.ch ------------------------------------------------ Improware AG, UNIX solution and service provider Zurlindenstrasse 29, 4133 Pratteln, Switzerland Phone: +41 79 370 26 05, Fax: +41 61 826 93 01 ------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message