Re: Question about RFC6724

JINMEI Tatuya / 神明達哉 <jinmei@wide.ad.jp> Tue, 03 May 2022 05:56 UTC

Return-Path: <jinmei@wide.ad.jp>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 89625C14F722 for <ipv6@ietfa.amsl.com>; Mon, 2 May 2022 22:56:15 -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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UA9hwTy2Q0Oi for <ipv6@ietfa.amsl.com>; Mon, 2 May 2022 22:56:14 -0700 (PDT)
Received: from mail.wide.ad.jp (mail.wide.ad.jp [IPv6:2001:200:0:1::7]) by ietfa.amsl.com (Postfix) with ESMTP id 8AFFAC15ED65 for <ipv6@ietf.org>; Mon, 2 May 2022 22:55:03 -0700 (PDT)
Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (authenticated (0 bits)) by mail.wide.ad.jp (8.14.1+3.5Wbeta/8.14.1/smtpfeed 1.21) with ESMTP id 2435st7H001268 (using TLSv1/SSLv3 with cipher AES128-GCM-SHA256 (128 bits) verified OK) for <ipv6@ietf.org>; Tue, 3 May 2022 14:54:55 +0900 (JST)
Received: by mail-pf1-f171.google.com with SMTP id c14so5095525pfn.2 for <ipv6@ietf.org>; Mon, 02 May 2022 22:54:55 -0700 (PDT)
X-Gm-Message-State: AOAM530Cf8xHbrDcBqAmYl2m3/XQxrMtmyRLqfV4DovlmcylX+6M5ksK Cor086AYJiBqSTvf4fEW7/8bEKUMmSWnEContOc=
X-Google-Smtp-Source: ABdhPJyVj/x49DpF+c1WRV+EXa87zrkQq/TIUndlRByEsKqZmNIzQXqV1bqE2PHowx6a6MBTpTCXhToL9k1S3uSaMgw=
X-Received: by 2002:a65:4789:0:b0:3a2:4866:dc48 with SMTP id e9-20020a654789000000b003a24866dc48mr12635628pgs.87.1651557294567; Mon, 02 May 2022 22:54:54 -0700 (PDT)
MIME-Version: 1.0
References: <985e9c94-b6f7-b45d-208d-e9b26664540b@gmail.com> <CAJE_bqfpURs++e9FaECp7zJFD3tTz4FGizYUo58U_7Ge1sWa0Q@mail.gmail.com> <75032723-c9a3-c59c-33cf-1744c538b7aa@gmail.com>
In-Reply-To: <75032723-c9a3-c59c-33cf-1744c538b7aa@gmail.com>
From: JINMEI Tatuya / 神明達哉 <jinmei@wide.ad.jp>
Date: Mon, 02 May 2022 22:54:42 -0700
X-Gmail-Original-Message-ID: <CAJE_bqdEj5qHiKBOC-jet6dg8PPVVmDXAOWZ5UXQyOTg04TOKA@mail.gmail.com>
Message-ID: <CAJE_bqdEj5qHiKBOC-jet6dg8PPVVmDXAOWZ5UXQyOTg04TOKA@mail.gmail.com>
Subject: Re: Question about RFC6724
To: Brian E Carpenter <brian.e.carpenter@gmail.com>
Cc: 6man <ipv6@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/tP5L977Erqr862bFQR82hQ8Chuo>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 May 2022 05:56:15 -0000

On Mon, May 2, 2022 at 7:02 PM Brian E Carpenter
<brian.e.carpenter@gmail.com> wrote:

> > I've just checked an implementation I'm relatively familiar with, and
> > found that it seems to completely ignore the "up to the length of S's
> > prefix" part:
> > https://github.com/freebsd/freebsd-src/blob/271f6d52a606e86c11b366082f11fe69350f24da/lib/libc/net/getaddrinfo.c#L924
> > that is, it compares the entire 128-bit IPv6 addresses and 32-bit IPv4
> > addresses.
>
> I think that makes a lot of sense. There's no real advantage in stopping
> the match at /64, and it's only by going beyond /96 that it can be
> useful for IPv4-mapped, if a host happens to have more than one IPv4
> address.

I suspect this implementation simply hasn't been updated since RFC3484,
rather than deliberately ignored the new text in RFC6724. But I
also suspect it wouldn't matter much in practice, since
- especially for IPv6, the interface ID length would be a constant
  (at least today, and will be so unless and until RFC4291 is updated
  to relax it), so the end result would be the same in practice.
- in the case of IPv4, the source address is often essentially unique,
  and the difference of CPL(S, D1) and CPL(S, D2) would not be that
  critical except for some unusally artifial cases.
- otherwise, rules using CommonPrefixLen are generally considered a
  "better than nothing" last resort, and an earlier rule would usually
  provide the selection winner.

--
jinmei