Re: Need your help: different connection IDs in the same datagram

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Thu, 16 July 2020 00:00 UTC

Return-Path: <dtikhonov@litespeedtech.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3C3513A0B96 for <quic@ietfa.amsl.com>; Wed, 15 Jul 2020 17:00:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=litespeedtech-com.20150623.gappssmtp.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 eqCfE90zJDHm for <quic@ietfa.amsl.com>; Wed, 15 Jul 2020 17:00:05 -0700 (PDT)
Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (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 943783A0B95 for <quic@ietf.org>; Wed, 15 Jul 2020 17:00:05 -0700 (PDT)
Received: by mail-qk1-x729.google.com with SMTP id b4so3770923qkn.11 for <quic@ietf.org>; Wed, 15 Jul 2020 17:00:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=s82Pjf/5vBv4h5cdYiYFyA+UySsXWREXkyMxPkFzMmg=; b=jQXFtVIf9rVid40D6KnYHXWS8hto/8no5sRtevlvIcpXKYdHqjgiBY24af/6rA7cDY +FQdznKNIfx9Jih4yPixUVkt2SlKnlMuSKn2RbQYaRDJNjcK9UoG1SgKIElvDZqp7S4l EA6t6crmkUQM1KeYpVs+9dJIfSkjQuHc/KBqiOcgmkqImjUf69X7NtKeEg/cIyYY1MuM OggpMx+a871FXAy/MraLZujsqpIMLTtH8BtSLXQAp+8EvhVHgm9iOGAQIcgNyA32Abu7 1HPTncmMeb6d9bOdx/yc3C9j82dlSsdm/zTIzUXslMZnZCWr06nBCi3OK71SRQbiM995 qgYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=s82Pjf/5vBv4h5cdYiYFyA+UySsXWREXkyMxPkFzMmg=; b=jjCx8MUnqsQLlOPHCwYY3+cVXRSqjsf72nbEfZtKnnuNA8HoTK0Gqs5EvJvht1MSu8 vrJnYWCd9DYnS2V2HJcWOsTXZCM/cgaUp6rdEYEuTeGOoJslJ/SkJGbswFSxjCjiE4I2 /0bsVTmR9wCK8ktlhgPvs2VBDzdfZJa0upFAfH/B4zU8+18nvZlefKpDiXwltOIWz7t4 79Qfo/+f1pAZvHMR7KBtebCi2akjng6eHqyvTAeYjVXjXWQJP78rexGVMYrz8xAqwS0l 8Pi8+utKCEOC69mCC81bgTLaaU2gz0rgDWRFgkokYosUXDxc82+etzeXrtpcFkcljGuM EpDw==
X-Gm-Message-State: AOAM531KiCQcM4Q05wm7WrOPpYXss8RE3uHD9hqBd5CiAnPyez2bQ026 6mwL4ZkkuYLHR45x3Imvmg6xa6SAmOgrmQ==
X-Google-Smtp-Source: ABdhPJzBGgZw/XOHWGYBcmnfLovyS5tVdddt9XkvdXTAJM6G+akZi8w5DsMgI4lQCctrW2j+9FB6mw==
X-Received: by 2002:ae9:de06:: with SMTP id s6mr1586237qkf.44.1594857604092; Wed, 15 Jul 2020 17:00:04 -0700 (PDT)
Received: from lubuntu (ool-44c1d219.dyn.optonline.net. [68.193.210.25]) by smtp.gmail.com with ESMTPSA id k6sm4188012qki.123.2020.07.15.17.00.03 for <quic@ietf.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 17:00:03 -0700 (PDT)
Date: Wed, 15 Jul 2020 19:59:58 -0400
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: quic@ietf.org
Subject: Re: Need your help: different connection IDs in the same datagram
Message-ID: <20200715235957.GE9808@lubuntu>
Mail-Followup-To: quic@ietf.org
References: <ae21cc02-3357-40c8-a1e9-3966fdf575a5@www.fastmail.com> <20200715180231.GB9808@lubuntu> <7ee5a352-fef6-44ed-9e82-09194aae366e@www.fastmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <7ee5a352-fef6-44ed-9e82-09194aae366e@www.fastmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/8Zdg2vjk0GH-qs_2959LpbVIn5E>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Jul 2020 00:00:07 -0000

You've lost me a bit, Martin.  Is this the code you aimed for?

    conn = NULL;
    while (quic_packet = parse_udp(pointers)) {
        dcid = parse(quic_packet);
        if (conn)
        {
  #if VARIANT_A
            if (!conn_owns_scid(conn, dcid))
  #elif VARIANT_B
            if (conn != lookup_by_dcid(dcid))
  #else
	    if (false)
  #endif
                continue;
        }
        conn = process_packet(quic_packet);
    }

On Thu, Jul 16, 2020 at 08:41:27AM +1000, Martin Thomson wrote:
> On Thu, Jul 16, 2020, at 04:02, Dmitri Tikhonov wrote:
> >   #if VARIANT_A
> >             if (!conn_owns_scid(conn, dcid))
> >   #else
> >             if (conn != lookup_by_dcid(dcid))
> # else
>              if (false)
> #endif
> 
> This would also work, would it not?
>