[tcpm] Handling of FIN in the reassembly queue

Andre Oppermann <andre@freebsd.org> Thu, 21 February 2008 23:09 UTC

Return-Path: <tcpm-bounces@ietf.org>
X-Original-To: ietfarch-tcpm-archive@core3.amsl.com
Delivered-To: ietfarch-tcpm-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D68183A6ABE; Thu, 21 Feb 2008 15:09:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.564
X-Spam-Level:
X-Spam-Status: No, score=-0.564 tagged_above=-999 required=5 tests=[AWL=-0.127, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_ORG=0.611, RDNS_NONE=0.1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sc4Cqtu6qMU5; Thu, 21 Feb 2008 15:09:34 -0800 (PST)
Received: from core3.amsl.com (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id B41C83A68EF; Thu, 21 Feb 2008 15:09:34 -0800 (PST)
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id AA83B3A6A24 for <tcpm@core3.amsl.com>; Thu, 21 Feb 2008 15:09:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bcrZTF4RytD2 for <tcpm@core3.amsl.com>; Thu, 21 Feb 2008 15:09:32 -0800 (PST)
Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by core3.amsl.com (Postfix) with ESMTP id 95C633A6814 for <tcpm@ietf.org>; Thu, 21 Feb 2008 15:09:31 -0800 (PST)
Received: (qmail 36368 invoked from network); 21 Feb 2008 22:25:23 -0000
Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender <andre@freebsd.org>) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for <tcpm@ietf.org>; 21 Feb 2008 22:25:23 -0000
Message-ID: <47BE04A2.8000000@freebsd.org>
Date: Fri, 22 Feb 2008 00:09:22 +0100
From: Andre Oppermann <andre@freebsd.org>
User-Agent: Thunderbird 1.5.0.14 (Windows/20071210)
MIME-Version: 1.0
To: tcpm@ietf.org
Subject: [tcpm] Handling of FIN in the reassembly queue
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <http://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <http://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tcpm-bounces@ietf.org
Errors-To: tcpm-bounces@ietf.org

The TCP reassembly queue is very good at handling and queuing out of
order data.  However correctly handling and queuing an out of order
FIN seems to be a bit tricky for a number of (broken) edge cases:

  1. FIN points into the middle of already queued data (or hole);
       Ignore the FIN and integrate the data?
       Ignore the whole segment with the bogus FIN?
       Integrate the data, move the FIN and flush excess data?

  2. FIN was already received and another one arrives pointing
     into the middle of already queue data (or hole);
       Ignore the FIN and integrate the data?
       Ignore the whole segment with the bogus FIN?
       Integrate the data, move the FIN and flush excess data?

  3. FIN was already received and another one arrives pointing
     beyond the previous one;
       Ignore the FIN and integrate the data (if within previous FIN)?
       Ignore the whole segment with the bogus FIN?
       Integrate the data and move the FIN?

  4. FIN without data pointing beyond already queued data;
       Queuing a standalone FIN w/o data and not directly attaching
       to the end of the queue complicates the implementation a lot.
       Is it acceptable to ignore the FIN for the moment and have it
       retransmitted (with or without data) later?

For reference the traditional reassembly queue implementation doesn't
care and queues any segment with FIN in any place.  Depending on the
hole situation this can lead to strange behavior and only ever partly
dequeued data.

Any input, insight and discussion welcome. :-)

-- 
Andre

_______________________________________________
tcpm mailing list
tcpm@ietf.org
http://www.ietf.org/mailman/listinfo/tcpm