From owner-freebsd-bugs Wed Aug 4 8:40:58 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5612B153C9 for ; Wed, 4 Aug 1999 08:40:54 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA18287; Wed, 4 Aug 1999 08:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id C62C9153C4; Wed, 4 Aug 1999 08:33:23 -0700 (PDT) Message-Id: <19990804153323.C62C9153C4@hub.freebsd.org> Date: Wed, 4 Aug 1999 08:33:23 -0700 (PDT) From: ypoeluev@certicom.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: i386/12964: Outgoing data with stream sockets on FreeBSD Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12964 >Category: i386 >Synopsis: Outgoing data with stream sockets on FreeBSD >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 4 08:40:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Yuri Poeluev >Release: 2.2.5 >Organization: Certicom Corp. >Environment: FreeBSD certicom.com 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Thu Jun 4 16:01:24 EDT 1998 root@:/usr/src/sys/compile/GALOIS i386 >Description: Hi, I'm using stream sockets for client and server communications and have found a problem with data sent from FreeBSD to any other platform (Solaris,WinNT,BSDi,etc). When the data has a size in the range 101-207 bytes, the receiver gets only 100 bytes. By the way, I was using blocking sockets and if I tried to read data again on the receiver side (other then FreeBSD), read operation can't succeed because apparently no data left for reading. There might have been some settings when we built our kernel, but I couldn't find anything. Your help will be appretiated. Thanks. >How-To-Repeat: On the server side (FreeBSD) ===================================== theSocket = socket(AF_INET, SOCK_STREAM, 0); theAddress.sin_port = htons((unsigned short)kPort); theAddress.sin_family = AF_INET; bind(theSocket, (struct sockaddr *)&theAddress, sizeof(theAddress)); listen(theSocket, 5); len = sizeof(theAddress); hisSocket = accept(theSocket,(struct sockaddr*)&theAddress, &len); send(hisSocket,buffer,105,0); ... On the client side (any other platform) ===================================== s = socket(AF_INET, SOCK_STREAM, 0); ent = gethostbyname(kServer); addressRec.sin_port = htons((unsigned short)kPort); addressRec.sin_family = AF_INET; addressRec.sin_addr = *((struct in_addr *)ent->h_addr); connect(s, (struct sockaddr *) &addressRec, sizeof(addressRec)); l=recv(s,buffer,sizeof(buffer),0); /* only 100 bytes read */ ... >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message