From owner-freebsd-current@FreeBSD.ORG Wed Apr 11 10:38:08 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 2112E16A401 for ; Wed, 11 Apr 2007 10:38:08 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by mx1.freebsd.org (Postfix) with ESMTP id E9DE813C46A for ; Wed, 11 Apr 2007 10:38:07 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-6.cisco.com with ESMTP; 11 Apr 2007 03:38:07 -0700 X-IronPort-AV: i="4.14,394,1170662400"; d="scan'208"; a="134420897:sNHT50557662" Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by sj-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id l3BAc7uH009704; Wed, 11 Apr 2007 03:38:07 -0700 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id l3BAc7MF008020; Wed, 11 Apr 2007 10:38:07 GMT Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 11 Apr 2007 03:38:06 -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 03:38:06 -0700 Message-ID: <461CBB32.3080802@cisco.com> Date: Wed, 11 Apr 2007 06:40:50 -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 10:38:06.0506 (UTC) FILETIME=[7D8830A0:01C77C25] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=1367; t=1176287887; x=1177151887; c=relaxed/simple; s=sjdkim2002; 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=LIyMD6DWui1W3T4fF9I3hZVXUdqrTb8F7kqQxIjnc34=; b=NKW7jx7oyMDB1Ypvs8nrHcIhEMoQ2u8yLeOpeHiwOEftD6u8SX9q1WTs+BrSIVc6fTNQ9ymd lCy8nU0SGFfxdlHXLb8XuKoFpiXMfyBVcyHOeX64kNbhzxAb2Rq3DIdA; Authentication-Results: sj-dkim-2; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim2002 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 10:38:08 -0000 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 > Martin: Thanks for the info.. I will take the patch and give this a try with all the current code (I have some patches that need to be committed.. but none relate to this problem).. I know earlier (about 4 months ago) we had this problem and I thought we had fixed it.. I will dig around and see what is wrong ... will let you know in a bit. R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)