[quicwg/base-drafts] lost_pn can go negative (#2611)

Lars Eggert <notifications@github.com> Fri, 12 April 2019 09:15 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 096131200B3 for <quic-issues@ietfa.amsl.com>; Fri, 12 Apr 2019 02:15:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.383
X-Spam-Level:
X-Spam-Status: No, score=-1.383 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_IMAGE_ONLY_24=1.618, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XOTRIJJ1vdt0 for <quic-issues@ietfa.amsl.com>; Fri, 12 Apr 2019 02:15:00 -0700 (PDT)
Received: from o7.sgmail.github.com (o7.sgmail.github.com [167.89.101.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D4DAE12017D for <quic-issues@ietf.org>; Fri, 12 Apr 2019 02:14:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=9rckQ867WvnP+jLj9AQZ7fMvsuE=; b=sEchFa+d5PvO+CIg kVRVGzvSmGZ5k6uphqDYGre17GXXBVpYa70cAJi3fob2us9t8VtSm+DM+4wMZkHw lwPO3gkfsZEh0aK/0J0JCW83prSg6Rl+6X5umbTaqN97uzw5VMI19oWrK2SJuZcG aUtBQYGvJLuCtRTIe30LOkWHvHI=
Received: by filter1848p1mdw1.sendgrid.net with SMTP id filter1848p1mdw1-9244-5CB05712-8 2019-04-12 09:14:58.239854397 +0000 UTC m=+292213.729637850
Received: from github-lowworker-baaab27.cp1-iad.github.net (unknown [192.30.252.33]) by ismtpd0036p1iad2.sendgrid.net (SG) with ESMTP id Gl3FuqDYRymzTwOgo97lAA for <quic-issues@ietf.org>; Fri, 12 Apr 2019 09:14:58.183 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-baaab27.cp1-iad.github.net (Postfix) with ESMTP id 283D880159 for <quic-issues@ietf.org>; Fri, 12 Apr 2019 02:14:58 -0700 (PDT)
Date: Fri, 12 Apr 2019 09:14:58 +0000 (UTC)
From: Lars Eggert <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abe8bba33c2a514a33a52ea296da8940494cb7de7e92cebabd899292a169ce19c6eb0a@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/2611@github.com>
Subject: [quicwg/base-drafts] lost_pn can go negative (#2611)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5cb0571224df8_4b9a3f9c6e4d45b4306687"; charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: larseggert
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak1ElGXgLzJ39HP2EcCSK4iNhNHd1tZmp8tqhj oxdEPFDJZ1x/toVk1rW8k6IFUHCBy/YzuUavdUoWf8qjax+qbnYpGN4F/qdT64caO0nvp9Jlen0aox 4i0jSbripzS3E/R4en9OoM2iTru/Ee4aAHy64VCuVrXze4nqaEIRMaKMRcquX7qFCJqXEC8FgdZwN2 s=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/Y5jld6AJ8ULdxCopoB82yLnmK6g>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Apr 2019 09:15:01 -0000

in `DetectLostPackets`, `lost_pn` is computed as
```
lost_pn = largest_acked_packet[pn_space] - kPacketThreshold
```
However, `largest_acked_packet` is initialied to zero
```
largest_acked_packet[pn_space] = 0
```
and so the subtraction can cause `lost_pn` to go negative when `DetectLostPackets` is called before an ACK is received (since it will be updated only in `OnAckReceived`.

Suggest to initialize `largest_acked_packet` to infinity and to explicitly check for this case.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2611