Re: Fix IPV6 literal notation?

Brian E Carpenter <brian.e.carpenter@gmail.com> Thu, 31 December 2020 03:47 UTC

Return-Path: <brian.e.carpenter@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 338543A0BF3 for <ipv6@ietfa.amsl.com>; Wed, 30 Dec 2020 19:47:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 MZ5_DbnJaMVZ for <ipv6@ietfa.amsl.com>; Wed, 30 Dec 2020 19:47:36 -0800 (PST)
Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 BB1353A0BF2 for <ipv6@ietf.org>; Wed, 30 Dec 2020 19:47:36 -0800 (PST)
Received: by mail-pf1-x42e.google.com with SMTP id 11so10662035pfu.4 for <ipv6@ietf.org>; Wed, 30 Dec 2020 19:47:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=YWh4CWTivip0/WuWtUy+Js4ciuJRg+pEW6u1WS8P2Sc=; b=nl3RnQfL40IJMMxPE9IwPfqFfuHkV9xI/pfmPEOSdszZixY4frXP8eruyhRdHMAQqV 6kwgEhw45YY//46fieW2NyibpBNOBHlW/VKKgSwYkaX2yizt+nMiFGSlOdK99XUcoFYG Z2sWrGrKJ0aYczITSo4WiwJ1YOl9+zd3G5BeGhsI7lGFNHXkuYho6fcXVaZ8Da61LO8G oSC8x68LLDIUtjty+R6yY29GwZlzJWVWW3O/wiXEnmE6aiHkhbV3biv2nzNTZQ8heso+ 07AahZvT6ql8dRyzFfcg6q9LOTSo+xia0pPP28LHCx6CVGInaNd4CQYSDAYnwx1GurJW NBJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YWh4CWTivip0/WuWtUy+Js4ciuJRg+pEW6u1WS8P2Sc=; b=pCTGwgauZHmqhaxvgd4MHuvccRYfnrtwzS+Cg1Dl+wKaabk6MnhSKxKFW3LBciuUKN URCgBkuIrwtVjzB38MthNEKitIOaSNvg55zd9Lj6ZUPTevize7wedyJG4/TzuFykIHgs joQbJNi+qxWsawR5O1/jVL8g+9Tebdlm3JqDdlpSxuy405o7EJDxDE0SRD1AJyZ3AVIr VWv8T9XDlOM1noZD4gz6+2UIndKTxjGPnqyra72lWXGSGK3WA2fVELusmzxOChRs+ODB svJ7dneJA0Of1dN5gTYi9QH9sIjVhm7ZJ3wsDpI2B1bgJ/I6WJxqIbsPUeYms/rZnELn SBVQ==
X-Gm-Message-State: AOAM532asAXUnCvxRro+jJw9Q7CGJPjrD4V2fXzGBDV7tY5tBIU6zyRd fyqIiRsYZXQjMFtxr6Ch75slR7J0yhI8IA==
X-Google-Smtp-Source: ABdhPJzXORQcZsdSjA5nK2jAnZzG/BerzAiz6L2TvOvqB5csIPXCWZToqBdZL3v1m/sFybYpGXbfAg==
X-Received: by 2002:aa7:85d8:0:b029:19e:610e:1974 with SMTP id z24-20020aa785d80000b029019e610e1974mr32106902pfn.21.1609386455661; Wed, 30 Dec 2020 19:47:35 -0800 (PST)
Received: from [192.168.178.20] ([151.210.131.28]) by smtp.gmail.com with ESMTPSA id fw12sm8411100pjb.43.2020.12.30.19.47.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Dec 2020 19:47:34 -0800 (PST)
Subject: Re: Fix IPV6 literal notation?
To: Alexandre Petrescu <alexandre.petrescu@gmail.com>, ipv6@ietf.org
References: <CAHBU6isQNkE0tmsn7v41Vptgf2OCTQ61gwMKDN4hmK4pBY-J9w@mail.gmail.com> <d244ee54-5f5c-b3e9-bc98-15d59e4ecbe9@gmail.com> <26f9d61c-00b2-03d9-1587-4d9155428993@gmail.com>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <75dbb983-b40c-1782-6fcf-682f9e2a504e@gmail.com>
Date: Thu, 31 Dec 2020 16:47:32 +1300
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <26f9d61c-00b2-03d9-1587-4d9155428993@gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/Zx-MKqymdx8yKDIsjdJt4r9fbbs>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 31 Dec 2020 03:47:38 -0000

On 30-Dec-20 00:27, Alexandre Petrescu wrote:
> 
> 
> Le 27/12/2020 à 00:25, Brian E Carpenter a écrit :
>> Tim,
>>
>> On 27-Dec-20 11:16, Tim Bray wrote:
>>> See https://twitter.com/dave_universetf/status/1342685822286360576 
>>> to which I heartily concur. IPV6 addresses are neither easy for 
>>> humans to read, nor easy for software to parse.
>>>
>>> *If* someone has a better idea, there’s no good reason not to 
>>> standardize it, the old approach would still work.   Does anyone 
>>> have a better idea?
>>
>> I have no idea if there's a proposal in that sequence of Twitter 
>> messages, but if there is, it should be written up as an I-D aimed
>> at the 6man WG and discussed there. (Hence I have changed the IETF
>> list to a Bcc: and added the 6man list in Cc:.)
>>
>> I can say that this much is wrong:
>>
>>> Oh, and the leading zero debate also infects IPv6, to some extent! 
>>> The specs tried to specify the textual representation of IPv6, but 
>>> it failed to be complete. So it's unclear if 
>>> 000001::00001.00002.00003.00004 is a valid IPv6 address
>>
>> It's quite clear that it is invalid. RFC4291 section 2.2 says:
>>
>> "1. The preferred form is x:x:x:x:x:x:x:x, where the 'x's are one to
>>  four hexadecimal digits of the eight 16-bit pieces of the address."
> 
> But there is also that notation in a certain RFC which says that
> 1::1.1.1.1 is a valid notation too.
> 
> So combining the two might indeed lead to 1::01.1.1.1 being a
> potentially valid notation as well.

The parsers that I have convenient access to all treat that leading 0
as invalid, which is no surprise if you study the URI ABNF.

   Brian
> 
>> As for writing a parser, I'd expect the starting point to be the
>> ABNF in RFC3986 (where the limitation to 4 hex digits is also
>> clear).
> 
> One might wonder why ABNF (A Backus Naur Form) and not other notations
> for grammar descriptions, such as ASN.1 (Abstract Syntax Notation number 1)?
> 
> But the idea of a reference parser would be great.  One might start with
> the parsers that are open source in BSD and in linux.
> 
> A reference parser implementation might help avoid incompatible IP
> literal address notations.
> 
> Alex
> 
>>
>> Regards Brian Carpenter
>>
>>
>> --------------------------------------------------------------------
>>  IETF IPv6 working group mailing list ipv6@ietf.org Administrative 
>> Requests: https://www.ietf.org/mailman/listinfo/ipv6 
>> --------------------------------------------------------------------
>>
> 
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> ipv6@ietf.org
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------
>