From owner-freebsd-current@FreeBSD.ORG Wed Apr 11 13:46:31 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8715D16A400 for ; Wed, 11 Apr 2007 13:46:31 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by mx1.freebsd.org (Postfix) with ESMTP id 65FBB13C468 for ; Wed, 11 Apr 2007 13:46:31 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-5.cisco.com ([171.68.10.79]) by sj-iport-5.cisco.com with ESMTP; 11 Apr 2007 06:46:31 -0700 X-IronPort-AV: i="4.14,395,1170662400"; d="scan'208"; a="410258316:sNHT46646524" Received: from sj-core-3.cisco.com (sj-core-3.cisco.com [171.68.223.137]) by sj-dkim-5.cisco.com (8.12.11/8.12.11) with ESMTP id l3BDkVS9032753; Wed, 11 Apr 2007 06:46:31 -0700 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-3.cisco.com (8.12.10/8.12.6) with ESMTP id l3BDkOAS023345; Wed, 11 Apr 2007 13:46:30 GMT Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 11 Apr 2007 06:45:58 -0700 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 11 Apr 2007 06:45:58 -0700 Message-ID: <461CE73C.3010204@cisco.com> Date: Wed, 11 Apr 2007 09:48:44 -0400 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061029 FreeBSD/i386 SeaMonkey/1.0.6 MIME-Version: 1.0 To: Martin Kulas References: <20070409214504.GA1780@thunderbird.tld> <461B6945.90109@cisco.com> <20070410181122.GA12483@thunderbird.tld> In-Reply-To: <20070410181122.GA12483@thunderbird.tld> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Apr 2007 13:45:58.0225 (UTC) FILETIME=[BC000410:01C77C3F] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=1447; t=1176299191; x=1177163191; c=relaxed/simple; s=sjdkim5002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20netcat=20with=20SCTP=20support |Sender:=20; bh=4UmAlAvV2kpb63X6WVJJPHLFvoVmda4zq20dcg7RirQ=; b=SCitE6vp0UWM4rSCY6sz+IPbAkpgqJeqO0bpzYr714w8ZyVPuAC/bPWawBtVjwROFFQkeCFI JAgwt7dT3DIqpW1ymG3c8e/RCkdkfLic66d9PU3m0TXN/n+gBrBPtrjz; Authentication-Results: sj-dkim-5; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim5002 verified; ); Cc: freebsd-current@freebsd.org, LI Xin Subject: Re: netcat with SCTP support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2007 13:46:31 -0000 Martin: Ok, I found it.. it was a simple case of not waking things up if an orderly shutdown happened.. opps. A comm lost (where you had an abort or some non-orderly shutdown) would have worked :-D I will add this to my next patch.. which i am due to submit.. I will send and let George have a look.. so I should get it in before the end of the week. If you want a private patch let me know and I will send it . R Martin Kulas wrote: > On Tue, Apr 10, 2007 at 06:39:01AM -0400, Randall Stewart wrote: >> Thanks for checking out SCTP for netcat... let me >> see if I can re-create this bug with current and figure >> out what is broken... This sounds like a bug with the >> TCP model.. > > I rewrote netcat's readwrite() to use select() instead of the poll() > systemcall but read() on the network file descriptor still does not > return EOF. So netcat is not notified that the SCTP association has > been closed. > >> So to recreate this.. I set things up run it >> and ctl-c the client? > > Yeah. > > Starting SCTP server: > $ nc -c -l 127.0.0.1 55555 > > Starting SCTP client: > $ nc -c 127.0.0.1 55555 > > Now send a SIGINT (ctl-c) to client or server. Sending SIGINT using > TCP sockets will terminate the connection immediately and notifing > the other side. > > Cheers, > Martin > -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)