Re: Objection to draft-ietf-6man-rfc4291bis-07.txt

Alexandre Petrescu <alexandre.petrescu@gmail.com> Tue, 28 March 2017 01:11 UTC

Return-Path: <alexandre.petrescu@gmail.com>
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 CB8401297ED for <ipv6@ietfa.amsl.com>; Mon, 27 Mar 2017 18:11:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.333
X-Spam-Level:
X-Spam-Status: No, score=-0.333 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665] autolearn=no 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 mwV8d9UBLExX for <ipv6@ietfa.amsl.com>; Mon, 27 Mar 2017 18:11:46 -0700 (PDT)
Received: from sainfoin-smtp-out.extra.cea.fr (sainfoin-smtp-out.extra.cea.fr [132.167.192.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DD4841297CA for <ipv6@ietf.org>; Mon, 27 Mar 2017 18:11:45 -0700 (PDT)
Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by sainfoin-sys.extra.cea.fr (8.14.7/8.14.7/CEAnet-Internet-out-4.0) with ESMTP id v2S1BiYB020590; Tue, 28 Mar 2017 03:11:44 +0200
Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 11320200FF2; Tue, 28 Mar 2017 03:11:44 +0200 (CEST)
Received: from muguet2.intra.cea.fr (muguet2.intra.cea.fr [132.166.192.7]) by pisaure.intra.cea.fr (Postfix) with ESMTP id 044BC200B59; Tue, 28 Mar 2017 03:11:44 +0200 (CEST)
Received: from [132.166.84.16] ([132.166.84.16]) by muguet2.intra.cea.fr (8.15.2/8.15.2/CEAnet-Intranet-out-1.4) with ESMTP id v2S1BgxG008017; Tue, 28 Mar 2017 03:11:43 +0200
Subject: Re: Objection to draft-ietf-6man-rfc4291bis-07.txt
To: 神明達哉 <jinmei@wide.ad.jp>
References: <20170223134026.GI5069@gir.theapt.org> <6DA95097-8730-4353-A0C9-3EB4719EA891@google.com> <CAN-Dau0s04c=RV0Y8AGaxBPFui41TWPTB+5o0K2Lj-iah0An1w@mail.gmail.com> <CAL9jLaYirty22iGiEjEaYq3_KA1FZhxBTOBWuFOXQ9C-WPd5xQ@mail.gmail.com> <CAN-Dau0n6oFm538XdJOcuO1yg92BCDD3mBu5YfBVm_+g-gtcKA@mail.gmail.com> <CAL9jLaYO=uYgVfSZ0SoSe0SujJ1xgwEKE8WLzo_keJHywgXTtg@mail.gmail.com> <CAN-Dau1vJV5O_Ythp6THkAu4-YZXV82Upny1V+ybbjCVZQQX=A@mail.gmail.com> <27cce319-18ac-5c0e-3497-af92344f0062@gmail.com> <de4988be-6031-08d9-84ce-21c3fa4f9bc9@gmail.com> <98401ef7-cf41-b4a0-4d11-a7d840181bd0@gmail.com> <1047f5fc-ae40-be52-6bab-27f31fe5e045@gmail.com> <9a94feac-8d59-b153-d41c-04fc371e4db4@gmail.com> <CAO42Z2z7v4gDk91b6Of-1sczV88m3B9kzn0MeJU_VBJ416k6Ww@mail.gmail.com> <ae35b45a-0398-840f-fc0d-1f64dd2fcc58@gmail.com> <CAJE_bqdZezDRti5LqCKnmU9QkwwhdejP22gXwk3wLKiS0mhx+Q@mail.gmail.com> <dfc8570d-fff0-39fe-a53f-db2c81c0ec8f@gmail.com> <CAJE_bqdHv0vw_kFFBZ2NE98t0nhkCR5rz8f=UOpwmvqtVjNqhg@mail.gmail.com>
Cc: 6man WG <ipv6@ietf.org>
From: Alexandre Petrescu <alexandre.petrescu@gmail.com>
Message-ID: <4e4f9c9a-96d8-2c5a-3c9b-12ea5ca5f2da@gmail.com>
Date: Mon, 27 Mar 2017 20:11:24 -0500
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <CAJE_bqdHv0vw_kFFBZ2NE98t0nhkCR5rz8f=UOpwmvqtVjNqhg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/H3yNsCFxQuJ9bnUcaZHl1lBb4jU>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.22
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, 28 Mar 2017 01:11:48 -0000


Le 27/03/2017 à 16:24, 神明達哉 a écrit :
> At Mon, 27 Mar 2017 16:00:58 -0500,
> Alexandre Petrescu <alexandre.petrescu@gmail.com> wrote:
>
>>> On the other hand, BSDs' implementation of the IN6_IS_ADDR_LINKLOCAL()
>>> macro only checks the first 10 bits:
>>>
>>> #define IN6_IS_ADDR_LINKLOCAL(a)        \
>>>         (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
>>
>> Tatuya, masking it that way it means that fe81::/10 is also recognized
>> as an LL address prefix, right?  I think it is good, but just checking.
>
> fe81::/10 is just an "abnormal" form of fe80::/10, but I guess you
> actually meant fe81::/16.  Assuming so, your understanding is correct:
> an address that matches fe81::/16 is recognized as unicast link-local
> wherever the IN6_IS_ADDR_LINKLOCAL macro is used for the test.  For
> example, BSD kernels consider this kind of address to be unicast
> link-local in the validation of received RA:
>
>     if (!IN6_IS_ADDR_LINKLOCAL(&saddr6)) {
>         nd6log((LOG_ERR,
>             "nd6_ra_input: src %s is not link-local\n",
>             ip6_sprintf(ip6bufs, &saddr6)));
>         goto bad;
>     }
> (this code only checks the first 10 bits).

If this code runs on an Ethernet interface, then I think it is wrong. 
BEcause the link-local prefix on an Ethernet interface is fe80::/64, and 
not fe80::/10.

IN6_IS_ADDR_LINK_LOCAL run on Ethernet should use a mask of 64bits, not 
10bits, as it currently does.

In general, a generic IN6_IS_ADDR_LINKLOCAL is good to use a /10 mask. 
But some different IN6_IS_ADDR_LINK_LOCAL_ETHERNET is good with mask /64.

fe81::1 on Ethernet is not a Link Local address.

fe81::1 in general _is_ a Link Local address.

(and, yes, ideally, it would be good to make that 64 a parameter even of 
Ethernet, but that is a separate discussion).

Alex

>
> --
> JINMEI, Tatuya
>