Re: [P2PSIP] Broken Stop and Wait Algorithm?

"Michael Chen" <michaelc@idssoftware.com> Fri, 18 October 2013 22:43 UTC

Return-Path: <michaelc@idssoftware.com>
X-Original-To: p2psip@ietfa.amsl.com
Delivered-To: p2psip@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EF35921F9A8C for <p2psip@ietfa.amsl.com>; Fri, 18 Oct 2013 15:43:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0J3jeEWXoskL for <p2psip@ietfa.amsl.com>; Fri, 18 Oct 2013 15:43:25 -0700 (PDT)
Received: from p3plwbeout03-03.prod.phx3.secureserver.net (p3plsmtp03-03-2.prod.phx3.secureserver.net [72.167.218.215]) by ietfa.amsl.com (Postfix) with ESMTP id 8D8BC21F9B12 for <p2psip@ietf.org>; Fri, 18 Oct 2013 15:43:22 -0700 (PDT)
Received: from localhost ([72.167.218.244]) by p3plwbeout03-03.prod.phx3.secureserver.net with bizsmtp id emjM1m0015GyNsw01mjMBJ; Fri, 18 Oct 2013 15:43:21 -0700
X-SID: emjM1m0015GyNsw01
Received: (qmail 25937 invoked by uid 99); 18 Oct 2013 22:43:21 -0000
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=_09d01da8832482feef822c9b09c67cf6"
To: Roland Bless <roland.bless@kit.edu>, P2PSIP WG <p2psip@ietf.org>
From: Michael Chen <michaelc@idssoftware.com>
In-Reply-To: <52619007.1060202@kit.edu>
Date: Fri, 18 Oct 2013 15:43:20 -0700
Message-Id: <20131018154320.59ca11a9ba9389561a029f06442e67fa.2a6464af81.mailapi@email03.secureserver.net>
X-Originating-IP: 75.85.78.244
User-Agent: MailAPI 24838
X-Sender: michaelc@idssoftware.com
Subject: Re: [P2PSIP] Broken Stop and Wait Algorithm?
X-BeenThere: p2psip@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Peer-to-Peer SIP working group discussion list <p2psip.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/p2psip>, <mailto:p2psip-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/p2psip>
List-Post: <mailto:p2psip@ietf.org>
List-Help: <mailto:p2psip-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/p2psip>, <mailto:p2psip-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Oct 2013 22:43:39 -0000

Roland,
 
Your fragment re-assembler must tolerate duplicate fragments, because it
is the nature of the UDP transport. By comparison, ACK is never repeated.
 
The sequence number must always incremented so that the receiver can
build the FramedMessage.received bitmask for the last 32 fragments.
 
Thanks
 
--Michael
--------- Original Message --------- Subject: [P2PSIP] Broken Stop and Wait Algorithm?
From: "Roland Bless" <roland.bless@kit.edu>
Date: 10/18/13 12:46 pm
To: "P2PSIP WG" <p2psip@ietf.org>

Hi all,
 
 while implementing more of the RELOAD protocol we came across
 the following issue:
 
 In sec. 6.6.3.1. Stop and Wait Sender Algorithm
 http://tools.ietf.org/html/draft-ietf-p2psip-base-26#section-6.6.3.1
 
 the spec says:
 For each retransmission, the sequence number MUST be incremented.
 
 Retransmissions continue until a response is received, or until a
 total of 5 requests have been sent or there has been a hard ICMP
 error [RFC1122] or a TLS alert. The sender knows a response was
 received when it receives an ACK with a sequence number that
 indicates it is a response to one of the transmissions of this
 messages.
 
 
 This would cause potential duplicates at the receiving side:
 
 A B
 ---------> FramedMsg #1 -------> ---> deliver FramedMsg #1
 
 |*drop* <-- Ack #1 ><----------
 
 (A: timeout
 + retransmit)
 
 ---------> FramedMsg #2 -------> ---> deliver FramedMsg #2
 (same as above, i.e.
 *duplicate*).
 <----------- Ack #2 ><-----------
 
 (A: ack received,
 transmit next frame)
 
 ---------> FramedMsg #3 -------> ---> deliver FramedMsg #3
 
 Given the current scheme, the receiver cannot
 distinguish between the retransmitted frame (#2) and
 a new one (#3). What was the reason to use _new_ sequence numbers
 for retransmissions? Unless you increment the
 sequence number by more than 5 for each _new_
 frame, the receiving side could not filter out
 duplicates.
 
 Did I miss something?
 
 Regards,
 Roland
 _______________________________________________
 P2PSIP mailing list
 P2PSIP@ietf.org
 https://www.ietf.org/mailman/listinfo/p2psip