Re: [DNSOP] Clarification question: compression pointers always to names earlier in the packet?

Ray Bellis <ray@bellis.me.uk> Wed, 24 October 2018 15:00 UTC

Return-Path: <ray@bellis.me.uk>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 36810130E6D for <dnsop@ietfa.amsl.com>; Wed, 24 Oct 2018 08:00:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 xxA3LUijxhAh for <dnsop@ietfa.amsl.com>; Wed, 24 Oct 2018 08:00:17 -0700 (PDT)
Received: from hydrogen.portfast.net (hydrogen.portfast.net [188.246.200.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA2E0130E44 for <dnsop@ietf.org>; Wed, 24 Oct 2018 08:00:15 -0700 (PDT)
Received: from [88.212.170.147] (port=63818 helo=rays-mbp.local) by hydrogen.portfast.net ([188.246.200.2]:465) with esmtpsa (fixed_plain:ray@bellis.me.uk) (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1gFKdo-0003A6-81 (Exim 4.72) for dnsop@ietf.org (return-path <ray@bellis.me.uk>); Wed, 24 Oct 2018 16:00:12 +0100
To: dnsop@ietf.org
References: <BC2CDF40-4FF0-4111-88B7-04969491D2E0@dukhovni.org> <alpine.DEB.2.20.1810241135130.24450@grey.csi.cam.ac.uk>
From: Ray Bellis <ray@bellis.me.uk>
Message-ID: <e29c2cf3-c447-f221-c62c-283ed048343f@bellis.me.uk>
Date: Wed, 24 Oct 2018 16:00:14 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <alpine.DEB.2.20.1810241135130.24450@grey.csi.cam.ac.uk>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/Al7zBAco89q6GW6CDsMjTvnFmEE>
Subject: Re: [DNSOP] Clarification question: compression pointers always to names earlier in the packet?
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Oct 2018 15:00:23 -0000

On 24/10/2018 11:45, Tony Finch wrote:

> There are two basic ways to avoid it:
>
> * Keep a high-water-mark separate from the current location, and require
>   pointers to be strictly less than the HWM. (I prefer this way.)

Right, but to be safe the HWM should be initialised with the position of
the _start_ of the label sequence that's being parsed.

Any time you follow a pointer you reset the HWM to the target of that
pointer (which per the rule above must be lower than the current value).

Ray